結果

問題 No.392 2分木をたどれ
ユーザー tabataba
提出日時 2017-05-19 05:22:02
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 461 bytes
コンパイル時間 907 ms
コンパイル使用メモリ 111,808 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-19 01:49:49
合計ジャッジ時間 1,404 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <cstdio>
#include <cstring>
#include <cmath>
#include <cassert>
#include <random>
#include <vector>
#include <algorithm>
#include <array>
#include <functional>
#include <utility>
#include <regex>
#include <tuple>
#include <map>

using namespace std;

int main(){
	int64_t m;
	-scanf("%ld",&m);
	for(int i=0;i<m;i++){
		int a;
		string s="";
		-scanf("%d",&a);
		a++;
		while(a!=1){
			s=(a&1?"R":"L")+s;
			a>>=1;
		}
		puts(s.c_str());
	}
	return 0;
}
0