Description
Submission
#include <cmath> #include <cstdio> #include <vector> #include <queue> #include <iostream> #include <algorithm> using namespace std; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int q; cin >> q; queue<int> Q; while(q--) { int type; cin >> type; if(type == 1) { int x; cin >> x; Q.push(x); } if(type == 2) { Q.pop(); } if(type == 3) { cout << Q.front() << endl; } } return 0; }