結果

問題 No.1026 OGAWA's New Keyboard
ユーザー kpinkcat
提出日時 2023-08-25 17:21:03
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 483 bytes
コンパイル時間 924 ms
コンパイル使用メモリ 103,360 KB
最終ジャッジ日時 2025-02-16 13:34:08
ジャッジサーバーID
(参考情報)
judge5 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 3 TLE * 1
other WA * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<map>
#include<vector>
#include <algorithm>
#include<math.h>
#include <iomanip>
#include<set>
#include <numeric>
using namespace std;


int main()
{
    int n;
    string s = "", temp = "";
    cin >> n;
    for (int i = 0; i < n; i++){
        char c;
        int t;
        cin >> t >> c;
        if (t == 0) temp += c;
        else if (temp.size()){
            s += temp;
            temp = "";
        } else s = c + s;
    }
    cout << s << endl;
}
0