結果
問題 | No.1026 OGAWA's New Keyboard |
ユーザー |
|
提出日時 | 2020-04-21 01:24:53 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 45 ms / 1,000 ms |
コード長 | 370 bytes |
コンパイル時間 | 1,543 ms |
コンパイル使用メモリ | 172,812 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-16 05:04:52 |
合計ジャッジ時間 | 2,531 ms |
ジャッジサーバーID (参考情報) |
judge6 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 21 |
ソースコード
#include <bits/stdc++.h> using namespace std; int32_t main() { int n; cin >> n; deque<char> q; for (int i = 0; i < n; i++) { int t; char c; cin >> t >> c; if (t) { q.push_front(c); } else { q.push_back(c); } } string str(q.begin(), q.end()); cout << str << endl; }