結果
問題 | No.392 2分木をたどれ |
ユーザー |
|
提出日時 | 2020-05-17 18:58:02 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 11 ms / 2,000 ms |
コード長 | 401 bytes |
コンパイル時間 | 1,191 ms |
コンパイル使用メモリ | 95,476 KB |
最終ジャッジ日時 | 2025-01-10 12:44:54 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 |
ソースコード
#include <iostream>#include <vector>#include <iomanip>#include <algorithm>#include <cmath>using namespace std;using ll = long long;int main(){int m, c;cin >> m;while (m--){cin >> c;string ans = "";while (c){ans.push_back((c & 1 ? 'L' : 'R'));c = (c - 1) >> 1;}reverse(ans.begin(), ans.end());cout << ans << '\n';}return 0;}