結果

問題 No.934 Explosive energy drink
ユーザー ngtkanangtkana
提出日時 2020-03-06 19:21:44
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 333 ms / 2,000 ms
コード長 553 bytes
コンパイル時間 1,724 ms
コンパイル使用メモリ 166,996 KB
実行使用メモリ 24,324 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-23 20:43:39
合計ジャッジ時間 6,239 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
23,664 KB
testcase_01 AC 332 ms
24,324 KB
testcase_02 AC 27 ms
23,616 KB
testcase_03 AC 168 ms
24,108 KB
testcase_04 AC 333 ms
24,216 KB
testcase_05 AC 26 ms
24,000 KB
testcase_06 AC 26 ms
23,472 KB
testcase_07 AC 26 ms
24,096 KB
testcase_08 AC 26 ms
23,436 KB
testcase_09 AC 26 ms
23,604 KB
testcase_10 AC 26 ms
24,000 KB
testcase_11 AC 27 ms
23,472 KB
testcase_12 AC 28 ms
23,700 KB
testcase_13 AC 31 ms
23,460 KB
testcase_14 AC 31 ms
23,388 KB
testcase_15 AC 111 ms
23,616 KB
testcase_16 AC 45 ms
23,568 KB
testcase_17 AC 68 ms
23,736 KB
testcase_18 AC 67 ms
23,556 KB
testcase_19 AC 130 ms
24,108 KB
testcase_20 AC 217 ms
23,712 KB
testcase_21 AC 231 ms
23,460 KB
testcase_22 AC 327 ms
23,712 KB
testcase_23 AC 333 ms
23,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
int main(){
    int n;std::cin>>n;
    std::vector<int>a;
    for(int i=1;i<=n;i++){
        std::cout<<"? "<<n-1<<std::endl;
        bool ckd=false;
        for(int j=1;j<=n;j++){
            if(i==j)continue;
            std::cout<<(std::exchange(ckd,true)?" ":"")<<j;
        }
        std::cout<<std::endl;
        int x;std::cin>>x;
        if(!x)a.push_back(i);
    }
    std::cout<<"! "<<a.size()<<std::endl;
    for(int i=0;i<(int)a.size();i++){
        std::cout<<(i?" ":"")<<a.at(i);
    }
    std::cout<<std::endl;
}

0