結果
問題 | No.392 2分木をたどれ |
ユーザー |
👑 |
提出日時 | 2019-03-31 22:11:31 |
言語 | C++11 (gcc 8.5.0) |
結果 |
AC
|
実行時間 | 8 ms / 2,000 ms |
コード長 | 591 bytes |
コンパイル時間 | 459 ms |
使用メモリ | 3,528 KB |
最終ジャッジ日時 | 2022-12-28 00:43:26 |
合計ジャッジ時間 | 1,142 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
3,528 KB |
testcase_01 | AC | 8 ms
3,376 KB |
testcase_02 | AC | 8 ms
3,424 KB |
ソースコード
#include <cstdio> #include <cstdlib> #include <cstddef> #include <vector> #include <algorithm> #include <cmath> #include <string> #include <iostream> #include <iomanip> int main(void) { int m; std::cin >> m; for(int i = 0; i < m; i++){ int a; std::cin >> a; std::string path; while(0 < a){ if(a % 2 == 0){ path.insert(0, "R"); a = a / 2 - 1; } else { path.insert(0, "L"); a /= 2; } } std::cout << path << std::endl; } return 0; }