ログイン
新規登録
AtsuoCoder Petrozavodsk Contest 001
読込中…
Home
Tasks
Clar
Submissions
Standings
提出 b397bed8-3da3-4d1a-a495-2936e9ddc7b5
コード
#include <bits/stdc++.h> using namespace std; int main() { int Q, T, X; cin >> Q; int A=0; for (int i; i<Q; i++){ cin >> T; if (T == 1){ cin >> X; A.push(X); } if (T == 2){ cout << A.front() << endl; A.pop(); } if (T == 3){ cout << A.size() << endl; } } }
結果
問題
点数
言語
結果
実行時間
メモリ
E - Q
0
C++
WJ
0 ms
0 KiB
コンパイルエラー
Main.cpp: In function 'int main()': Main.cpp:12:12: error: request for member 'push' in 'A', which is of non-class type 'int' 12 | A.push(X); | ^~~~ Main.cpp:15:20: error: request for member 'front' in 'A', which is of non-class type 'int' 15 | cout << A.front() << endl; | ^~~~~ Main.cpp:16:12: error: request for member 'pop' in 'A', which is of non-class type 'int' 16 | A.pop(); | ^~~ Main.cpp:19:20: error: request for member 'size' in 'A', which is of non-class type 'int' 19 | cout << A.size() << endl; | ^~~~