結果
| 問題 | No.392 2分木をたどれ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-05-17 18:58:02 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 5 ms / 2,000 ms |
| コード長 | 401 bytes |
| 記録 | |
| コンパイル時間 | 943 ms |
| コンパイル使用メモリ | 111,988 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-10 04:36:32 |
| 合計ジャッジ時間 | 1,280 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 |
ソースコード
#include <iostream>
#include <vector>
#include <iomanip>
#include <algorithm>
#include <cmath>
using namespace std;
using ll = long long;
int main()
{
int m, c;
cin >> m;
while (m--)
{
cin >> c;
string ans = "";
while (c)
{
ans.push_back((c & 1 ? 'L' : 'R'));
c = (c - 1) >> 1;
}
reverse(ans.begin(), ans.end());
cout << ans << '\n';
}
return 0;
}