結果
| 問題 |
No.392 2分木をたどれ
|
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2025-04-18 15:21:31 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 1,809 bytes |
| コンパイル時間 | 3,044 ms |
| コンパイル使用メモリ | 275,912 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-04-18 15:21:36 |
| 合計ジャッジ時間 | 3,706 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
inline int read(){
int x=0;
char c=getchar();
while(c<'0' || c>'9'){
c=getchar();
}
while(c>='0' && c<='9'){
x=(x<<1)+(x<<3)+(c^48);
c=getchar();
}
return x;
}
int T;
void solve(){
int n;
n=read();
n++;
string s;
while(n>1){
if(n&1){
s+="R";
}else{
s+="L";
}
n>>=1;
}
reverse(s.begin(),s.end());
cout<<s<<"\n";
}
signed main(){
// freopen("path.in","r",stdin);
// freopen("path.out","w",stdout);
T=read();
while(T--){
solve();
}
return 0;
}
/*??
??????
???????????????????????
????????????????????
???????????5???????????????????????????????????????????????????????????????????????????????????????????????24?????????????????????????????????????????????????????????????????????
????????????????????
???????????????????????????????????????????????????????????????????????????????????????????...?????????????
?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????...????????????????????????????????
??????????????
????????????
?????????????
?????????????
?????????
??? ? ?? ? ???????
???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????
?????????????????????????????????????????????????????????????????????????????????????????????????????????????????
???????????????????????????
?????????????????????
????????????????????
?????????????
????????????????
????????????????????????
?????????????????????????
??????
??????????????
????????????
???????????????????
????????????
??????
?????
???????????
??????????????
?????
?????
?????
??????
???????????????
??????????
??????????????
????????????
????*/
vjudge1