66分QWQ代码求调
#include <iostream>
#include <stack>
using namespace std;
typedef unsigned long long ull;
stack<ull> st;
ull t;
int main() {
ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
cin >> t;
for(ull i = 1; i <= t; i++) {
ull n;
cin >> n;
for(ull j = 1; j <= n; j++) {
string s;
cin >> s;
if(s == "push") {
ull x;
cin >> x;
st.push(x);
}
if(s == "pop") {
if(st.empty())
cout << "Empty" << endl;
else st.pop();
}
if(s == "query") {
if(st.empty())
cout << "Anguei!" << endl;
else
cout << st.top() << endl;
}
if(s == "size")
cout << st.size() << endl;
}
}
return 0;
}