結果
問題 | No.1026 OGAWA's New Keyboard |
ユーザー |
![]() |
提出日時 | 2020-05-04 02:41:27 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 42 ms / 1,000 ms |
コード長 | 424 bytes |
コンパイル時間 | 2,351 ms |
コンパイル使用メモリ | 170,320 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-16 05:05:52 |
合計ジャッジ時間 | 3,076 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 21 |
ソースコード
#include <bits/stdc++.h> #define int long long using namespace std; const int MOD = 1000000007; using Graph = vector<vector<int>>; signed main() { int N; cin >> N; deque<char> d; for( int i = 0; i < N; i++ ){ int T; cin >> T; char C; cin >> C; if( T == 0 ) d.push_back(C); else d.push_front(C); } while( !d.empty() ){ cout << d.front(); d.pop_front(); } cout << endl; }