結果

問題 No.1026 OGAWA's New Keyboard
ユーザー T.StreamT.Stream
提出日時 2020-05-16 12:20:02
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 59 ms / 1,000 ms
コード長 290 bytes
コンパイル時間 2,777 ms
コンパイル使用メモリ 196,584 KB
最終ジャッジ日時 2025-01-10 12:26:02
ジャッジサーバーID
(参考情報)
judge4 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main() {
	long n,i,t;
	cin >> n;
	deque<char> s;
	char c;
	for(i=0; i<n; i++){
		cin >> t >> c;
		if(t==0){
			s.push_back(c);
		}else{
			s.push_front(c);
		}
	}
	for(i=0; i<s.size(); i++){
		cout << s[i];
	}
	cout << endl;
	
	return 0;
}
0