呜呜呜呜呜呜呜呜大泠蛋啊
#include <bits/stdc++.h>
using namespace std;
int main(){
queue<unsigned long long> s;
int n;
cin >> n;
int a;
for (int j = 1; j <= n; j++) {
cin >> a;
if ( a == 1 ) {
int num;
cin >> num;
s.push(num);
} else if ( a == 2 ) {
if ( s.empty() ) {
cout << "ERR_CANNOT_POP" << endl;
} else {
s.pop();
}
} else if ( a == 3 ) {
if ( s.empty() ) {
cout << "ERR_CANNOT_QUERY" << endl;
} else {
cout << s.back() << endl;
}
} else if ( a == 4 ) {
cout << s.size() << endl;
}
}
return 0;
}