結果
問題 |
No.392 2分木をたどれ
|
ユーザー |
![]() |
提出日時 | 2019-07-20 03:50:37 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 10 ms / 2,000 ms |
コード長 | 319 bytes |
コンパイル時間 | 997 ms |
コンパイル使用メモリ | 69,504 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-26 18:25:41 |
合計ジャッジ時間 | 1,682 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 |
ソースコード
#include <algorithm> #include <iostream> #include <vector> using namespace std; string f(int n) { if (n == 1) return ""; return f(n >> 1) + "LR"[n % 2]; } int main() { int m; cin >> m; while (m--) { int a; cin >> a; string s = f(a + 1); cout << s << endl; } return 0; }