結果

問題 No.2828 Remainder Game
ユーザー rieaaddlreiuu
提出日時 2024-12-04 23:02:11
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 111 ms / 2,000 ms
コード長 577 bytes
コンパイル時間 1,847 ms
コンパイル使用メモリ 168,896 KB
実行使用メモリ 25,448 KB
平均クエリ数 28.00
最終ジャッジ日時 2024-12-04 23:02:17
合計ジャッジ時間 5,770 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
    int N;
    cin >> N;
    int M = 1;
    int result = 0;
    vector<int> bit(14);
    for(int k=0;k<13;k++){
        M *= 2;//M = 2^{k+1}
        //kueriはっこう
        cout << M << " " << M/2 << endl;
        for(int d=0;d<M/2;d++){
            cout << M/2 + d;
            if(d != M/2 -1){
                cout << " ";
            } else {
                cout << endl;
            }
        }
        cin >> bit[k];
        result += bit[k]*M/2;
    }
    cout << "0 1" << endl;
    cout << result << endl;
}
0