結果

問題 No.1026 OGAWA's New Keyboard
ユーザー phspls
提出日時 2020-04-24 22:05:13
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 48 ms / 1,000 ms
コード長 384 bytes
コンパイル時間 1,605 ms
コンパイル使用メモリ 171,372 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-16 05:05:02
合計ジャッジ時間 2,592 ms
ジャッジサーバーID
(参考情報)
judge6 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define llong long long

int main() {
    int n;
    cin >> n;
    deque<char> result;
    rep(i, n) {
        int t;
        char c;
        cin >> t >> c;
        if(t) result.push_front(c);
        else result.push_back(c);
    }
    rep(i, n) cout << result[i];
    cout << "\n";
}
0