結果
問題 | No.392 2分木をたどれ |
ユーザー | ku_material_ro |
提出日時 | 2016-09-26 00:30:25 |
言語 | C++11 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 428 bytes |
コンパイル時間 | 477 ms |
コンパイル使用メモリ | 59,232 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-04-29 11:22:44 |
合計ジャッジ時間 | 2,772 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | OLE | - |
testcase_02 | OLE | - |
ソースコード
#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; }