結果
問題 | No.1026 OGAWA's New Keyboard |
ユーザー |
|
提出日時 | 2022-08-02 10:03:48 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 45 ms / 1,000 ms |
コード長 | 293 bytes |
コンパイル時間 | 1,668 ms |
コンパイル使用メモリ | 167,424 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-07-23 02:56:41 |
合計ジャッジ時間 | 3,180 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 21 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ string fr, ba; int n, t; char c; cin >> n; for(int i = 0; i < n; i++){ cin >> t >> c; if(t & 1)fr += c; else ba += c; } reverse(fr.begin(), fr.end()); cout << fr << ba << endl; }