#include<bits/stdc++.h>
using namespace std;
const int N=100010;
int a[N],l=0;
int main(){
int n;
cin>>n;
for(int j=1;j<=n;j++){
int x;
cin>>x;
if(x==1){
int y;
l++;
cin>>y;
a[l]=y;
}
if(x==2){
if(l==0){
cout<<"ERR_CANNOT_POP"<<endl;
continue;
}
for(int i=1;i<=l;i++)
a[i]=a[i+1];
l--;
}
if(x==3){
if(l==0){
cout<<"ERR_CANNOT_POP"<<endl;
continue;
}
cout<<a[1]<<endl;
}
if(x==4){
cout<<l<<endl;
}
}
return 0;
}
不是到底是哪里有问题呀