結果

問題 No.392 2分木をたどれ
ユーザー snrnsidysnrnsidy
提出日時 2021-07-04 00:58:28
言語 C++17
(gcc 11.2.0 + boost 1.78.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 358 bytes
コンパイル時間 2,725 ms
使用メモリ 3,576 KB
最終ジャッジ日時 2023-01-31 13:14:43
合計ジャッジ時間 3,435 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 2 ms
3,536 KB
testcase_01 AC 3 ms
3,576 KB
testcase_02 AC 3 ms
3,404 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main(void)
{
	cin.tie(0);
	ios::sync_with_stdio(false);

	int m, t;

	cin >> m;

	for (int i = 0; i < m; i++)
	{
		cin >> t;
		string res;
		t += 1;
		while (t > 1)
		{
			if (t % 2)
			{
				res = 'R' + res;
			}
			else
			{
				res = 'L' + res;
			}
			t /= 2;
		}
		cout << res << '\n';
	}
	return 0;
}
0