結果

問題 No.934 Explosive energy drink
ユーザー rogi52rogi52
提出日時 2022-10-03 01:07:09
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 317 ms / 2,000 ms
コード長 562 bytes
コンパイル時間 2,160 ms
コンパイル使用メモリ 201,288 KB
実行使用メモリ 24,312 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-08-26 22:33:39
合計ジャッジ時間 7,616 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
23,628 KB
testcase_01 AC 314 ms
23,532 KB
testcase_02 AC 25 ms
23,628 KB
testcase_03 AC 159 ms
23,532 KB
testcase_04 AC 310 ms
23,448 KB
testcase_05 AC 25 ms
23,436 KB
testcase_06 AC 25 ms
24,024 KB
testcase_07 AC 25 ms
23,628 KB
testcase_08 AC 25 ms
24,312 KB
testcase_09 AC 26 ms
24,036 KB
testcase_10 AC 25 ms
23,400 KB
testcase_11 AC 25 ms
23,676 KB
testcase_12 AC 27 ms
24,024 KB
testcase_13 AC 30 ms
24,048 KB
testcase_14 AC 32 ms
24,048 KB
testcase_15 AC 104 ms
23,652 KB
testcase_16 AC 43 ms
24,240 KB
testcase_17 AC 63 ms
23,388 KB
testcase_18 AC 64 ms
23,820 KB
testcase_19 AC 122 ms
24,012 KB
testcase_20 AC 203 ms
23,664 KB
testcase_21 AC 217 ms
23,400 KB
testcase_22 AC 306 ms
23,412 KB
testcase_23 AC 317 ms
23,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(0);
    
    int N; cin >> N;
    vector<int> b;
    rep(i,N) {
        cout << "?" << " " << N - 1 << endl;
        rep(j,N) if(j != i) cout << j + 1 << " ";
        cout << endl;
        cout.flush();
        int ans; cin >> ans;
        if(ans == 0) b.push_back(i + 1);
    }

    cout << "!" << " " << b.size() << endl;
    for(int x : b) cout << x << " "; cout << endl;
    cout.flush();
}
0