結果
問題 | No.392 2分木をたどれ |
ユーザー |
![]() |
提出日時 | 2020-11-12 23:17:02 |
言語 | C++14 (gcc 11.2.0 + boost 1.78.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 500 bytes |
コンパイル時間 | 1,680 ms |
使用メモリ | 6,264 KB |
最終ジャッジ日時 | 2023-02-22 18:38:57 |
合計ジャッジ時間 | 2,423 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
テストケース
テストケース表示入力 | 結果 | 実行時間 使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
6,264 KB |
testcase_01 | AC | 3 ms
6,212 KB |
testcase_02 | AC | 3 ms
6,172 KB |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; using ul = unsigned long; using ull = unsigned long long; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int m; cin >> m; stringstream ss; for (int i = 0; i < m; ++i) { int a; cin >> a; stack<string> st; while (a) { st.push(a & 1 ? "L"s : "R"s); --a; a >>= 1; } while (!st.empty()) { ss << st.top(); st.pop(); } ss << "\n"; } cout << ss.str(); return 0; }