ログイン
新規登録
AtsuoCoder Waseda Tour Finals 2025
読込中…
Home
Tasks
Clar
Submissions
Standings
提出 42049e76-5b1f-4f9d-bfb9-90ff1befd5d6
コード
#include <bits/stdc++.h> using namespace std; int main() { queue<int> A; int B,C,D; cin>>B; for(int i=0;i<B;i++){ cin>>D; if{(D==1||D==2)cin>C;} if(D==1){ A.push(C); } else if(D==2){ S.unshift(C); } else if(D==3){ cout<<S.front()<<endl; A.pop(); } } }
結果
問題
点数
言語
結果
実行時間
メモリ
E - Q2
0
C++
WJ
0 ms
0 KiB
コンパイルエラー
Main.cpp: In function 'int main()': Main.cpp:11:11: error: expected '(' before '{' token 11 | if{(D==1||D==2)cin>C;} | ^ | ( Main.cpp:16:24: error: 'S' was not declared in this scope 16 | else if(D==2){ S.unshift(C); | ^ Main.cpp:19:30: error: 'S' was not declared in this scope 19 | else if(D==3){ cout<<S.front()<<endl; | ^