1 #include<iostream>
2 using namespace std;
3 const int MAX=100+10;
4 int main()
5 {
6 string str[MAX];
7 str[0]="http://www.acm.org/";
8 int max=0,pos=0;
9 string t;
10 while(cin>>t)
11 {
12 if(t[0]=='Q') break;
13 if(t[0]=='V') {
14 cin>>t;
15 cout<<t<<endl;
16 str[++pos]=t;max=pos;
17 }else if(t[0]=='F') {
18 if(pos+1<=max) cout<<str[++pos]<<endl;
19 else cout<<"Ignored\n";
20 }else if(t[0]=='B'){
21 if(pos>0) cout<<str[--pos]<<endl;
22 else cout<<"Ignored\n";
23 }
24 }
25 }
Web Navigation
最新推荐文章于 2020-04-20 21:00:29 发布