結果

問題 No.392 2分木をたどれ
ユーザー 0w10w1
提出日時 2016-11-21 02:24:34
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 8 ms / 2,000 ms
コード長 320 bytes
コンパイル時間 1,601 ms
コンパイル使用メモリ 164,648 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-18 06:05:47
合計ジャッジ時間 2,054 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 8 ms
4,376 KB
testcase_02 AC 8 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

signed main(){
  int M; cin >> M;
  for( int i = 0; i < M; ++i ){
    string ans;
    int A; cin >> A;
    while( A ){
      ans += "RL"[ A & 1 ];
      if( ~A & 1 ) --A;
      A >>= 1;
    }
    reverse( ans.begin(), ans.end() );
    cout << ans << endl;
  }
  return 0;
}
0