結果
問題 |
No.1026 OGAWA's New Keyboard
|
ユーザー |
![]() |
提出日時 | 2020-06-23 21:10:29 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 45 ms / 1,000 ms |
コード長 | 435 bytes |
コンパイル時間 | 1,897 ms |
コンパイル使用メモリ | 173,336 KB |
実行使用メモリ | 16,316 KB |
最終ジャッジ日時 | 2024-07-03 19:27:55 |
合計ジャッジ時間 | 3,046 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 21 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; deque<string> q(n); for (int i = 0; i < n; ++i) { int f; string s; cin >> f >> s; if (f == 0) q.push_back(s); else q.push_front(s); } for(auto s : q) cout << s; cout << "\n"; return 0; }