結果

問題 No.934 Explosive energy drink
ユーザー toririm_toririm_
提出日時 2019-11-29 23:54:26
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 326 ms / 2,000 ms
コード長 732 bytes
コンパイル時間 1,283 ms
コンパイル使用メモリ 149,080 KB
実行使用メモリ 24,384 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-23 19:05:44
合計ジャッジ時間 6,171 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
23,796 KB
testcase_01 AC 322 ms
24,204 KB
testcase_02 AC 26 ms
23,352 KB
testcase_03 AC 163 ms
23,364 KB
testcase_04 AC 326 ms
23,640 KB
testcase_05 AC 27 ms
24,024 KB
testcase_06 AC 26 ms
24,228 KB
testcase_07 AC 26 ms
23,352 KB
testcase_08 AC 25 ms
23,388 KB
testcase_09 AC 26 ms
23,364 KB
testcase_10 AC 26 ms
23,616 KB
testcase_11 AC 27 ms
23,352 KB
testcase_12 AC 28 ms
24,012 KB
testcase_13 AC 30 ms
23,400 KB
testcase_14 AC 32 ms
23,508 KB
testcase_15 AC 108 ms
23,496 KB
testcase_16 AC 42 ms
23,964 KB
testcase_17 AC 65 ms
24,228 KB
testcase_18 AC 65 ms
23,520 KB
testcase_19 AC 126 ms
23,628 KB
testcase_20 AC 210 ms
24,204 KB
testcase_21 AC 223 ms
24,384 KB
testcase_22 AC 315 ms
24,000 KB
testcase_23 AC 321 ms
23,796 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(vec) vec.begin(),vec.end()
#define MOD 1000000007
#define int long long

signed main(){
    int n;cin>>n;
    set<int> ans;
    rep(i,n){
        printf("? %lld\n",n-1);
        int j=1;
        if(i==0){
            printf("2");
            j=2;
        }else printf("1");
        for(;j<n;j++){
            if(i==j)continue;
            printf(" %lld",j+1);
        }
        cout<<endl;
        int u;
        cin>>u;
        if(!u)ans.insert(i+1);
    }
    printf("! %lld\n",ans.size());
    int e=0;
    for(auto a:ans){
        if(e==0)printf("%lld",a);
        else printf(" %lld",a);
        e=1;
    }
    cout<<endl;
}
0