ログイン
新規登録
AtsuoCoder Waseda Tour Finals 2025
読込中…
Home
Tasks
Clar
Submissions
Standings
提出 cd4cf071-08f1-4b26-9981-f8b75a42c4e1
コード
#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; S.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:21:15: error: 'class std::deque<int>' has no member named 'pop' 21 | S.pop(); | ^~~