結果
問題 | No.392 2分木をたどれ |
ユーザー |
![]() |
提出日時 | 2016-09-26 00:30:25 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 428 bytes |
コンパイル時間 | 441 ms |
コンパイル使用メモリ | 59,580 KB |
実行使用メモリ | 6,816 KB |
最終ジャッジ日時 | 2024-11-18 14:22:17 |
合計ジャッジ時間 | 2,204 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 1 OLE * 2 |
ソースコード
#include <iostream>#include <string>#include <math.h>using namespace std;int main(){int m;int n;string s="";cin >> m;int a[4094];for (int i = 0; i < m; i++){cin >> a[i];a[i] += 1;while (1){if (a[i] == 1){cout << s << endl;break;}n = a[i] % 2;if (n == 0){s.insert(s.begin(), 'L');}else{s.insert(s.begin(), 'R');}a[i] /= 2;}}return 0;}