結果
| 問題 |
No.392 2分木をたどれ
|
| コンテスト | |
| ユーザー |
CELICA
|
| 提出日時 | 2020-11-12 23:17:02 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 5 ms / 2,000 ms |
| コード長 | 500 bytes |
| コンパイル時間 | 1,714 ms |
| コンパイル使用メモリ | 173,568 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-22 19:49:11 |
| 合計ジャッジ時間 | 2,064 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 |
ソースコード
#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;
}
CELICA