結果
問題 | No.392 2分木をたどれ |
ユーザー |
|
提出日時 | 2018-05-05 09:06:11 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 9 ms / 2,000 ms |
コード長 | 548 bytes |
コンパイル時間 | 557 ms |
コンパイル使用メモリ | 69,504 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-28 01:31:45 |
合計ジャッジ時間 | 962 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 |
ソースコード
#include<iostream>#include<vector>using namespace std;int main(){int m;cin >> m;while(m-- > 0){int x;cin >> x;vector<char> res;while(x != 0){if(x % 2 == 0){res.push_back('R');}else{res.push_back('L');}x--;x /= 2;}for(vector<char>::reverse_iterator it = res.rbegin(); it != res.rend(); it++){cout << (*it);}cout << endl;}return 0;}