結果
| 問題 |
No.392 2分木をたどれ
|
| コンテスト | |
| ユーザー |
mine691
|
| 提出日時 | 2018-07-04 13:44:34 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 10 ms / 2,000 ms |
| コード長 | 431 bytes |
| コンパイル時間 | 507 ms |
| コンパイル使用メモリ | 66,812 KB |
| 実行使用メモリ | 6,940 KB |
| 最終ジャッジ日時 | 2024-07-01 02:11:58 |
| 合計ジャッジ時間 | 961 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 |
ソースコード
#include <iostream>
#include <algorithm>
using namespace std;
using ll = long long;
int bitget(int a){
int ans = 0;
while (a > 0){
a /= 2;
ans++;
}
return ans;
}
int main(){
int n;
cin >> n;
int a[10000];
for (int i = 0; i < n; i++){
cin >> a[i];
a[i]++;
}
for (int i = 0; i < n; i++){
for (int j = bitget(a[i])-2; j >=0; j--){
if (a[i] & (1 << j))cout << "R";
else cout << "L";
}
cout << endl;
}
}
mine691