結果
問題 | No.2828 Remainder Game |
ユーザー |
![]() |
提出日時 | 2024-08-02 21:47:43 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 80 ms / 2,000 ms |
コード長 | 577 bytes |
コンパイル時間 | 598 ms |
コンパイル使用メモリ | 68,368 KB |
実行使用メモリ | 25,208 KB |
平均クエリ数 | 22.00 |
最終ジャッジ日時 | 2024-08-02 21:47:46 |
合計ジャッジ時間 | 3,158 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 |
ソースコード
// // Created by HakuroKawashiro on 2024/8/2. // #include <cstdio> #include <cstring> #include <algorithm> #include <iostream> #define ll long long using namespace std; int main() { ll n; cin >> n; ll ans = 0, bs = 2; while(bs < 2000) { ll k = bs / 2; cout << bs << " " << k << endl; for (ll i = 1;i <= k;i++) { cout << bs - i << " "; } cout << endl; ll val; cin >> val; ans = ans + val * k; bs <<= 1ll; } cout << "0 1" << endl; cout << ans << endl; return 0; }