結果
| 問題 |
No.392 2分木をたどれ
|
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2025-04-20 21:08:24 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 2,000 ms |
| コード長 | 575 bytes |
| コンパイル時間 | 1,581 ms |
| コンパイル使用メモリ | 164,480 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-04-20 21:08:27 |
| 合計ジャッジ時間 | 2,035 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 |
ソースコード
#include <bits/stdc++.h>
#define int long long
//#define USE_FREOPEN
#define MUL_TEST
#define FILENAME "path"
using namespace std;
void solve() {
string s = "";
int x;
cin >> x;
x++;
while (x > 1) {
if (x & 1) s = 'R' + s;
else s = 'L' + s;
x >>= 1;
}
cout << s << '\n';
}
signed main() {
ios::sync_with_stdio(false);
cin.tie(nullptr); cout.tie(nullptr);
#ifdef USE_FREOPEN
freopen(FILENAME ".in","r",stdin);
freopen(FILENAME ".out","w",stdout);
#endif
int _ = 1;
#ifdef MUL_TEST
cin >> _;
#endif
while (_--)
solve();
_^=_;
return 0^_^0;
}
vjudge1