結果
| 問題 |
No.392 2分木をたどれ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-10-24 01:41:49 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 9 ms / 2,000 ms |
| コード長 | 474 bytes |
| コンパイル時間 | 639 ms |
| コンパイル使用メモリ | 74,368 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-02 12:53:56 |
| 合計ジャッジ時間 | 1,060 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 |
ソースコード
#include <iostream>
#include <algorithm>
#include <map>
using namespace std;
using LL = long long;
using ULL = unsigned long long;
int main() {
int m;
cin >> m;
map<int, string> map;
int A;
for (int i = 0; i < m; i++) {
cin >> A;
string r;
while (A) {
if (A % 2 == 0) r += "R";
else r += "L";
A = (A - 1) / 2;
}
reverse(r.begin(), r.end());
cout << r << endl;
}
}