結果
問題 | No.1026 OGAWA's New Keyboard |
ユーザー |
![]() |
提出日時 | 2023-08-25 17:31:07 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 67 ms / 1,000 ms |
コード長 | 572 bytes |
コンパイル時間 | 968 ms |
コンパイル使用メモリ | 102,884 KB |
最終ジャッジ日時 | 2025-02-16 13:34:20 |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 21 |
ソースコード
#include<iostream>#include<map>#include<vector>#include <algorithm>#include<math.h>#include <iomanip>#include<set>#include <numeric>using namespace std;int main(){int n;string s = "", temp1 = "", temp2 = "";cin >> n;for (int i = 0; i < n; i++){char c;int t;cin >> t >> c;if (t == 0) temp1 += c;else temp2 = c + temp2;if (!(i%1000) || i == n-1){s += temp1;s = temp2 + s;temp1 = "";temp2 = "";}}cout << s << endl;}