結果
問題 | No.1026 OGAWA's New Keyboard |
ユーザー |
|
提出日時 | 2020-04-21 01:07:51 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 23 ms / 1,000 ms |
コード長 | 476 bytes |
コンパイル時間 | 1,183 ms |
コンパイル使用メモリ | 73,428 KB |
最終ジャッジ日時 | 2025-01-09 22:02:27 |
ジャッジサーバーID (参考情報) |
judge2 / judge6 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 21 |
ソースコード
#include <iostream> #include <deque> void solve() { std::deque<char> s; int n; std::cin >> n; while (n--) { int t; char c; std::cin >> t >> c; if (t == 0) { s.push_back(c); } else { s.push_front(c); } } for (auto c : s) std::cout << c; std::cout << std::endl; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }