結果
問題 |
No.392 2分木をたどれ
|
ユーザー |
![]() |
提出日時 | 2025-04-18 15:34:07 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 10 ms / 2,000 ms |
コード長 | 364 bytes |
コンパイル時間 | 2,931 ms |
コンパイル使用メモリ | 278,024 KB |
実行使用メモリ | 7,844 KB |
最終ジャッジ日時 | 2025-04-18 15:34:12 |
合計ジャッジ時間 | 3,602 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 |
ソースコード
#include<bits/stdc++.h> #define int long long using namespace std; void sol(){ int n,c; cin>>n; n++; stack<char> s; while(n>1){ if(n&1) s.push('R'); else s.push('L'); n>>=1; }while(s.size()){ cout<<s.top(); s.pop(); } cout<<endl; } signed main(){ // freopen(".in","r",stdin); // freopen(".out","w",stdout); int T; cin>>T; while(T--) sol(); }