結果

問題 No.1026 OGAWA's New Keyboard
ユーザー kekenx
提出日時 2020-05-26 22:57:41
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 46 ms / 1,000 ms
コード長 327 bytes
コンパイル時間 1,540 ms
コンパイル使用メモリ 170,376 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-13 03:07:52
合計ジャッジ時間 2,558 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;


int main() {
  int n;
  cin >> n;
  deque<char> d;
  for (int i = 0; i < n; ++i) {
    int t;
    char s;
    cin >> t >> s;
    if (t == 0) d.push_back(s);
    else d.push_front(s);
  }
  for (int i = 0; i < n; ++i) cout << d[i];
  puts("");
  return 0;
}
0