結果

問題 No.1026 OGAWA's New Keyboard
ユーザー Homuhomu
提出日時 2020-04-19 23:10:19
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 52 ms / 1,000 ms
コード長 360 bytes
コンパイル時間 818 ms
コンパイル使用メモリ 66,088 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-16 05:04:15
合計ジャッジ時間 1,754 ms
ジャッジサーバーID
(参考情報)
judge6 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 5
other AC * 21
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>

using namespace std;
int main() 
{
	string r_b;
	string r_f;
	int N;
	cin >> N;
	for (int i = 0; i < N; ++i)
	{
		int T;
		string S;
		cin >> T;
		cin >> S;
		if (T == 0)
			r_b += S;
		else
			r_f += S;
	}
	string r;
	for (int i = r_f.length() - 1; i >= 0; --i)
		r += r_f[i];
	r += r_b;
	cout << r << endl;
	return 0;
}
0