結果
問題 | No.392 2分木をたどれ |
ユーザー |
![]() |
提出日時 | 2016-12-17 00:44:47 |
言語 | C++14 (gcc 11.2.0 + boost 1.78.0) |
結果 |
AC
|
実行時間 | 7 ms / 2,000 ms |
コード長 | 436 bytes |
コンパイル時間 | 1,330 ms |
使用メモリ | 6,952 KB |
最終ジャッジ日時 | 2023-01-07 01:15:01 |
合計ジャッジ時間 | 2,278 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
テストケース
テストケース表示入力 | 結果 | 実行時間 使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
6,952 KB |
testcase_01 | AC | 7 ms
4,900 KB |
testcase_02 | AC | 7 ms
4,904 KB |
ソースコード
#include <bits/stdc++.h> using namespace std; struct Initializer { Initializer() { cin.tie(0); ios::sync_with_stdio(0); cout << fixed << setprecision(15); } } initializer; int main() { int m; cin >> m; for (int i = 0; i < m; ++i) { int a; cin >> a; string res; for (++a; a != 1; a /= 2) { res += a % 2 ? "R" : "L"; } reverse(res.begin(), res.end()); cout << res << endl; } }