题解
【入门】叫号软件
1 条题解
-
0
#include<bits/stdc++.h> using namespace std; queue<string>a; int main(){ string s,c; while(cin>>s){ if(s=="END"){ break; }else if(s=="PUSH"){ cin>>c; a.push(c); }else if(s=="POP"){ if(a.empty()==1){ cout<<"EMPTY"<<endl; }else{ cout<<a.front()<<endl; a.pop(); } } } return 0; }
- 1