結果

問題 No.1026 OGAWA's New Keyboard
ユーザー face4
提出日時 2020-04-15 12:23:53
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 54 ms / 1,000 ms
コード長 316 bytes
コンパイル時間 763 ms
コンパイル使用メモリ 66,176 KB
実行使用メモリ 9,600 KB
最終ジャッジ日時 2024-09-16 05:02:39
合計ジャッジ時間 1,811 ms
ジャッジサーバーID
(参考情報)
judge1 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<list>
using namespace std;

int main(){
    int n;
    cin >> n;
    list<char> l;
    while(n--){
        int t;
        char c;
        cin >> t >> c;
        if(t)   l.push_front(c);
        else    l.push_back(c);
    }
    for(char c : l) cout << c;
    cout << endl;
    return 0;
}
0