結果

問題 No.1026 OGAWA's New Keyboard
ユーザー ytftytft
提出日時 2022-03-22 01:07:02
言語 C++17(clang)
(17.0.6 + boost 1.87.0)
結果
AC  
実行時間 41 ms / 1,000 ms
コード長 308 bytes
コンパイル時間 4,197 ms
コンパイル使用メモリ 162,424 KB
実行使用メモリ 9,728 KB
最終ジャッジ日時 2024-10-09 16:00:44
合計ジャッジ時間 5,177 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int main(){
	int N,p;
	char c;
	list<char> ans;
	scanf("%d ",&N);
	for(int i=0;i<N;++i){
		scanf("%d %c ",&p,&c);
		if(p){
			ans.push_front(c);
		}else{
			ans.push_back(c);
		}
	}
	for(auto i=ans.begin();i!=ans.end();++i){
		printf("%c",*i);
	}
	printf("\n");
}
0