为什么会WA qwq
#include <bits/stdc++.h>//洛谷B3614【模板】栈
using namespace std;
int main(){
int t;
cin >> t;
stack<int> s;
for(int j=1;j<=t;j++){
int n;
cin >> n;
while(!s.empty()){
s.pop();
}
for(int i=1;i<=n;i++){
string x;
cin >> x;
if(x == "push"){
int y;
cin >> y;
s.push(y);
}
if(x == "pop"){
if(!s.empty()){
s.pop();
}else{
cout << "Empty" << endl;
}
}
if(x == "query"){
if(!s.empty()){
cout << s.top() << endl;
}else{
cout << "Anguei!" << endl;
}
}
if(x == "size"){
cout << s.size() << endl;
}
}
}
return 0;
}