ログイン
新規登録
AtsuoCoder Waseda Tour Finals 2025
読込中…
Home
Tasks
Clar
Submissions
Standings
提出 2c39ff00-3087-4da8-b0dd-5c27e80dc326
コード
#include <bits/stdc++.h> using namespace std; int main() { std::deque<int> S; ; // 先頭に1を追加 int Q,X,T; cin>>Q; for(int i=0;i<Q;i++){ cin>>T; if(T==1){cin>>X; S.push(X); } else if(T==2){ cin>>X; deq.push_front(X) } else if(T==3){ cout<<S.front()<<endl; S.pop(); } } }
結果
問題
点数
言語
結果
実行時間
メモリ
E - Q2
0
C++
WJ
0 ms
0 KiB
コンパイルエラー
Main.cpp: In function 'int main()': Main.cpp:14:14: error: 'class std::deque<int>' has no member named 'push' 14 | S.push(X); | ^~~~ Main.cpp:17:9: error: 'deq' was not declared in this scope 17 | deq.push_front(X) | ^~~ Main.cpp:21:15: error: 'class std::deque<int>' has no member named 'pop' 21 | S.pop(); | ^~~