結果

問題 No.1026 OGAWA's New Keyboard
ユーザー zeronosu77108
提出日時 2020-06-23 21:16:23
言語 C++17(clang)
(17.0.6 + boost 1.87.0)
結果
AC  
実行時間 52 ms / 1,000 ms
コード長 440 bytes
コンパイル時間 1,414 ms
コンパイル使用メモリ 130,584 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-30 18:43:15
合計ジャッジ時間 2,584 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <string>
#include <utility>
#include <algorithm>
#include <climits>
#include <map>
#include <queue>

using namespace std;

int main() {
    int n;
    cin >> n;
    deque<char> deq;
    for (int i=0; i<n; i++) {
        int t;
        char c;
        cin >> t >> c;
        if (!t) deq.push_back(c);
        else deq.push_front(c);
    }

    for (auto c : deq) cout << c;
    cout << endl;
}
0