結果
問題 | No.2828 Remainder Game |
ユーザー |
|
提出日時 | 2024-08-03 11:17:19 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 390 bytes |
コンパイル時間 | 637 ms |
コンパイル使用メモリ | 66,936 KB |
最終ジャッジ日時 | 2025-02-23 20:46:11 |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 WA * 19 |
ソースコード
#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 <= 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; }