結果
問題 | No.1026 OGAWA's New Keyboard |
ユーザー |
|
提出日時 | 2024-03-27 08:54:13 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 44 ms / 1,000 ms |
コード長 | 397 bytes |
コンパイル時間 | 3,731 ms |
コンパイル使用メモリ | 253,708 KB |
最終ジャッジ日時 | 2025-02-20 13:59:08 |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 5 |
other | AC * 21 |
ソースコード
#include <bits/stdc++.h>#include <atcoder/all>using namespace std;using namespace atcoder;using ll = long long;using ld = long double;int N, T;char c;deque<char> deq;int main() {cin >> N;for (int i = 0; i < N; i++) {cin >> T >> c;if (T == 0) deq.push_back(c);if (T == 1) deq.push_front(c);}for (auto c: deq) {cout << c;}cout << endl;return 0;}