結果
問題 |
No.1026 OGAWA's New Keyboard
|
ユーザー |
|
提出日時 | 2025-02-12 19:15:23 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 17 ms / 1,000 ms |
コード長 | 504 bytes |
コンパイル時間 | 3,560 ms |
コンパイル使用メモリ | 276,788 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2025-02-12 19:15:29 |
合計ジャッジ時間 | 5,205 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 21 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; #ifdef LOCAL #include "algo/debug.h" #else #define debug(...) (void(0)) #endif void run_case(); int main() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr); int T = 1; // cin >> T; while (T--) run_case(); return 0; } void run_case() { int N; cin >> N; string h, t; while(N--) { int op; char s; cin >> op >> s; if(op == 0) t += s; else h += s; } reverse(h.begin(), h.end()); cout << h + t << endl; }