結果
| 問題 |
No.392 2分木をたどれ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-12-06 18:01:37 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 9 ms / 2,000 ms |
| コード長 | 339 bytes |
| コンパイル時間 | 923 ms |
| コンパイル使用メモリ | 68,648 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-14 02:34:54 |
| 合計ジャッジ時間 | 1,089 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 |
ソースコード
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main() {
int m, a;
string ans;
cin >> m;
for (int i = 0; i < m; ++i) {
cin >> a;
ans = "";
do {
if (a % 2) ans += 'L';
else {
ans += 'R';
--a;
}
} while (a /= 2);
reverse(ans.begin(), ans.end());
cout << ans << endl;
}
}