#include<iostream>
using namespace std;
unsigned long long st[1000010];
int t,n,x,top=0;
string op;
int main()
{
cin>>t;
for(register int i=0;i<t;i++)
{
cin>>n;
top=0;
for(register int j=0;j<n;j++)
{
cin>>op;
if(op=="push")
{
cin>>x;
st[top]=x;
top++;
}
else if(op=="pop")
{
if(top==0)
cout<<"Empty"<<endl;
else
top--;
}
else if(op=="query")
{
if(top==0)
cout<<"Anguei!"<<endl;
else
cout<<st[top-1]<<endl;
}
else
cout<<top<<endl;
}
}
return 0;
}
样例过了,测评0分,求助