結果
| 問題 |
No.392 2分木をたどれ
|
| コンテスト | |
| ユーザー |
tetsuzuki1115
|
| 提出日時 | 2017-09-28 13:40:42 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 8 ms / 2,000 ms |
| コード長 | 726 bytes |
| コンパイル時間 | 835 ms |
| コンパイル使用メモリ | 83,516 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-15 18:13:21 |
| 合計ジャッジ時間 | 1,378 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <cstring>
#include <math.h>
#include <cmath>
#include <limits.h>
#include <map>
#include <set>
#include <queue>
#include <algorithm>
#include <functional>
#include <stdio.h>
using namespace std;
long long MOD = 1000000007;
int main() {
int m;
cin >> m;
vector<string> ans;
for ( int i = 0; i < m; i++ ) {
int A;
cin >> A;
string S;
while (A) {
S += A%2 ? 'L' : 'R';
A = A%2 ? (A-1)/2 : (A-2)/2;
}
reverse( S.begin(), S.end() );
ans.push_back(S);
}
for ( auto& a : ans ) {
cout << a << endl;
}
return 0;
}
tetsuzuki1115