为什么33分?
请各位大佬帮助
代码如下:
#include<bits/stdc++.h>
using namespace std;
string str;
long long p,t,tt;
stack<int>s;
int main(){
cin>>t;
for(int i=1;i<=t;i++){
cin>>tt;
for(int j=1;j<=tt;j++){
cin>>str;
if(str=="push"){
cin>>p;
s.push(p);
}
else if(str=="query"){
if(s.size()) cout<<s.top()<<"\n";
else cout<<"Anguei!"<<"\n";
}
else if(str=="pop"){
if(s.size()) s.pop();
else cout<<"Empty"<<"\n";
}
else if(str=="size") cout<<s.size()<<"\n";
}
}
return 0;
}