結果

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

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

using ll = long long;

int main() {
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int n;
    cin >> n;
    deque<char> s;
    for (int i = 0; i < n; ++i) {
        int t;
        char c;
        cin >> t >> c;
        if (t == 0) s.push_back(c);
        else s.push_front(c);
    }

    for (char c : s) {
        cout << c;
    }
    cout << "\n";
    return 0;
}
0