結果

問題 No.1026 OGAWA's New Keyboard
ユーザー chacoder1
提出日時 2021-03-02 20:47:56
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 415 ms / 1,000 ms
コード長 303 bytes
コンパイル時間 1,848 ms
コンパイル使用メモリ 193,004 KB
最終ジャッジ日時 2025-01-19 09:32:20
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main(){
  int n,t;
  cin>>n;
  string s="";
  string c;
  rep(i,n){
    cin>>t>>c;
    
    if(t==0){
      s+=c;
    }
    else{
      s.insert(0,c);
    }
  }
  cout<<s<<endl;
  return 0;
}
0