#include<bits/stdc++.h>
using namespace std;
const unsigned long long maxn=1e9;
char sta[maxn];
unsigned long long head=0;
int push(char n){
sta[head]=n;
head++;
}
int query(){
if(head==0) cout<<"Anguei!\n";
else cout<<sta[head-1]<<endl;
}
int size(){
cout<<head<<endl;
}
int pop(){
if(head==0) cout<<"Empty\n";
else head-=1;
}
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
unsigned long long n;
string a;
char b;
cin>>n;
unsigned long long m;
for(int i=1;i<=n;i++){
memset(sta,1e9,0);
cin>>m;
for(int j=1;j<=m;j++){
cin>>a;
if(a=="push") {
cin>>b;
push(b);
}
if(a=="query") query();
if(a=="pop") pop();
if(a=="size") size();
}
}
return 0;
}
为什么2 RE,1 TLE?