ログイン
新規登録
AtsuoCoder Petrozavodsk Contest 001
読込中…
Home
Tasks
Clar
Submissions
Standings
提出 999cb4f2-25b9-4b6e-924b-2cf98ae25fbe
コード
#include <iostream> // cout, endl, cin #include <string> // string, to_string, stoi #include <vector> // vector #include <algorithm> // min, max, swap, sort, reverse, lower_bound, upper_bound #include <utility> // pair, make_pair #include <tuple> // tuple, make_tuple #include <cstdint> // int64_t, int*_t #include <cstdio> // printf #include <map> // map #include <queue> // queue, priority_queue #include <set> // set #include <stack> // stack #include <deque> // deque #include <unordered_map> // unordered_map #include <unordered_set> // unordered_set #include <bitset> // bitset #include <cctype> // isupper, islower, isdigit, toupper, tolower #include <cmath> // pow, sqrt #include <iomanip> // setprecision #define int int64_t #define double long double using namespace std; signed main() { //cout << fixed << setprecision(10); queue<int> q; int qu; cin >> qu; for (int i = 0; i < qu; i++) { int t; cin >> t; if (t == 1) { int x; cin >> x; q.push(x); } else if (t == 2) { cout << q.front() << endl; q.pop(); } else if (t == 3) { cout << q.size() << endl; } } return 0; }
結果
問題
点数
言語
結果
実行時間
メモリ
E - Q
100
C++
AC
185 ms
3796 KiB