测试点1AC,但2,3没过,求各位大佬帮助
#include<bits/stdc++.h>
using namespace std;
unsigned long long a[1000005],top=0;
void push(int b)
{
top++;
a[top]=b;
}
void pop()
{
if(top==0)
cout<<"Empty"<<endl;
else{
a[top]=0;
top--;}
}
void query()
{
if(top<=0)
cout<<"Anguei!"<<endl;
else cout<<a[top]<<endl;
}
void size()
{
cout<<top<<endl;
}
int main()
{
long long t,n,m;
string s;
cin>>t;
for(int i=1;i<=t;i++)
{
cin>>n;
for(int j=1;j<=n;j++)
{
cin>>s;
if(s=="push")
{cin>>m;push(m);}
else
if(s=="query")query();
else
if(s=="pop")pop();
else
if(s=="size")size();
}
memset(a,0,sizeof(a));
}
return 0;
}