結果
問題 | No.392 2分木をたどれ |
ユーザー |
![]() |
提出日時 | 2016-07-12 00:30:24 |
言語 | C++14 (gcc 11.2.0 + boost 1.78.0) |
結果 |
AC
|
実行時間 | 8 ms / 2,000 ms |
コード長 | 1,068 bytes |
コンパイル時間 | 1,007 ms |
使用メモリ | 4,904 KB |
最終ジャッジ日時 | 2022-12-08 16:42:43 |
合計ジャッジ時間 | 1,563 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,904 KB |
testcase_01 | AC | 7 ms
4,904 KB |
testcase_02 | AC | 8 ms
4,900 KB |
ソースコード
#include <cstdlib> #include <cmath> #include <climits> #include <cfloat> #include <map> #include <utility> #include <set> #include <iostream> #include <memory> #include <string> #include <vector> #include <algorithm> #include <functional> #include <sstream> #include <deque> #include <complex> #include <stack> #include <queue> #include <cstdio> #include <cctype> #include <cstring> #include <ctime> #include <iterator> #include <bitset> #include <numeric> #include <list> #include <iomanip> #include <cassert> #include <array> #include <tuple> #include <initializer_list> #include <unordered_set> #include <unordered_map> #include <forward_list> using namespace std; using ll = long long; #define rep(i,n) for (int i = 0; i < (int)(n); i++) #define all(c) begin(c), end(c) int main() { int n; cin >> n; for (int i = 0; i < n; i++) { int x; cin >> x; ++x; string s; while (x != 1) { s += "LR"[x & 1]; x >>= 1; } reverse(s.begin(), s.end()); cout << s << endl; } }