結果
| 問題 | No.392 2分木をたどれ |
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2025-04-18 16:08:11 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 421 bytes |
| 記録 | |
| コンパイル時間 | 1,984 ms |
| コンパイル使用メモリ | 332,736 KB |
| 実行使用メモリ | 5,632 KB |
| 最終ジャッジ日時 | 2026-07-09 17:34:09 |
| 合計ジャッジ時間 | 2,681 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 3 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
ll T,n;
int main(){
cin>>T;
while(T--){
cin>>n;
n++;
vector<char>a;
while(n!=1){
// cout<<n<<endl;
if(n&1)a.push_back('R');
else a.push_back('L');
n>>=1;
}
for(ll i=0;i<a.size();i++)cout<<a[i];
cout<<endl;
}
}
/*
1 2 L 10
2 3 R 11
3 4 LL 100
4 5 LR 101
5 6 RL 110
6 7 RR 111
7 8 LLL 1000
8 9 LLR 1001
...
21 22 LRRL 10110
*/
vjudge1