結果
| 問題 | No.2828 Remainder Game |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-08-03 11:24:24 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 35 ms / 2,000 ms |
| コード長 | 394 bytes |
| 記録 | |
| コンパイル時間 | 309 ms |
| コンパイル使用メモリ | 80,788 KB |
| 実行使用メモリ | 9,260 KB |
| 平均クエリ数 | 17.60 |
| 最終ジャッジ日時 | 2026-07-05 09:31:53 |
| 合計ジャッジ時間 | 2,091 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
#include <iostream>
using namespace std;
int main()
{
cin.tie(nullptr);
ios::sync_with_stdio(false);
int N, sum = 0, i, M, R, C;
cin >> N;
for (M = 2, R = 1; M / 2 <= N; M *= 2)
{
cout << M << ' ' << M / 2 << '\n' << R;
for (++R; R != M; ++R)
cout << ' ' << R;
cout << '\n' << flush;
cin >> C;
sum += M / 2 * C;
}
cout << "0 1\n" << sum << '\n' << flush;
return 0;
}