結果
| 問題 | 
                            No.2828 Remainder Game
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2024-08-02 21:46:29 | 
| 言語 | C++23  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 486 bytes | 
| コンパイル時間 | 1,008 ms | 
| コンパイル使用メモリ | 80,512 KB | 
| 実行使用メモリ | 25,220 KB | 
| 平均クエリ数 | 17.60 | 
| 最終ジャッジ日時 | 2024-08-02 21:46:33 | 
| 合計ジャッジ時間 | 4,179 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | WA * 20 | 
ソースコード
#include <iostream>
using namespace std;
int N, sz, ans, C;
int main() {
    cin >> N;
    sz = 2; ans = 0;
    while (sz <= N)
        sz *= 2;
    while (sz >= 2) {
        cout << sz << sz / 2 << "\n";
        for (int i = 0; i < sz / 2; i++)
            cout << i << ((i == sz / 2 - 1) ? "\n" : " ");
        cout.flush();
        cin >> C;
        sz /= 2;
        ans += C * sz;
    }
    cout << 0 << " " << 1 << "\n";
    cout << ans << "\n";
    cout.flush();
    return 0;
}