結果
問題 | No.392 2分木をたどれ |
ユーザー |
|
提出日時 | 2021-07-04 00:58:28 |
言語 | C++17 (gcc 12.2.0 + boost 1.81.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 358 bytes |
コンパイル時間 | 3,128 ms |
コンパイル使用メモリ | 199,432 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-09-13 06:49:32 |
合計ジャッジ時間 | 2,419 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,376 KB |
testcase_01 | AC | 4 ms
4,380 KB |
testcase_02 | AC | 4 ms
4,380 KB |
ソースコード
#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; }