結果

問題 No.934 Explosive energy drink
ユーザー otamay6otamay6
提出日時 2019-11-29 22:14:57
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 293 ms / 2,000 ms
コード長 567 bytes
コンパイル時間 2,182 ms
コンパイル使用メモリ 166,148 KB
実行使用メモリ 24,408 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-23 18:39:48
合計ジャッジ時間 7,258 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
23,496 KB
testcase_01 AC 284 ms
23,808 KB
testcase_02 AC 24 ms
24,276 KB
testcase_03 AC 147 ms
23,460 KB
testcase_04 AC 293 ms
24,048 KB
testcase_05 AC 26 ms
23,460 KB
testcase_06 AC 23 ms
24,288 KB
testcase_07 AC 23 ms
24,408 KB
testcase_08 AC 24 ms
23,652 KB
testcase_09 AC 25 ms
23,940 KB
testcase_10 AC 25 ms
23,700 KB
testcase_11 AC 24 ms
24,276 KB
testcase_12 AC 25 ms
23,952 KB
testcase_13 AC 28 ms
23,580 KB
testcase_14 AC 29 ms
24,240 KB
testcase_15 AC 99 ms
24,204 KB
testcase_16 AC 40 ms
23,604 KB
testcase_17 AC 59 ms
24,252 KB
testcase_18 AC 59 ms
23,352 KB
testcase_19 AC 115 ms
23,664 KB
testcase_20 AC 185 ms
23,952 KB
testcase_21 AC 203 ms
24,036 KB
testcase_22 AC 280 ms
24,036 KB
testcase_23 AC 281 ms
23,952 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#define REP(i,n) for(int i=0,i##_len=(n);i<i##_len;++i)
#define rep(i,a,b) for(int i=int(a);i<int(b);++i)
#define All(x) (x).begin(),(x).end()
using namespace std;
using ll = long long;

int main(){
    int N;cin>>N;
    vector<int> ans;
    REP(i,N){
        cout<<"? "<<N-1<<endl;
        REP(j,N) if(j!=i) cout<<j+1<<" \n"[j==((i!=N-1)?N-1:N-2)];
        fflush(stdout);
        int a;
        cin>>a;
        if(a==0) ans.push_back(i+1);
    }
    cout<<"! "<<ans.size()<<endl;
    REP(i,ans.size()) cout<<ans[i]<<" \n"[i+1==ans.size()];
}
0