結果

問題 No.934 Explosive energy drink
ユーザー tko919tko919
提出日時 2019-11-30 00:59:04
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 331 ms / 2,000 ms
コード長 872 bytes
コンパイル時間 1,520 ms
コンパイル使用メモリ 164,384 KB
実行使用メモリ 24,396 KB
平均クエリ数 355.79
最終ジャッジ日時 2023-09-23 19:06:40
合計ジャッジ時間 6,567 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
24,012 KB
testcase_01 AC 331 ms
23,544 KB
testcase_02 AC 27 ms
23,856 KB
testcase_03 AC 166 ms
24,240 KB
testcase_04 AC 330 ms
24,288 KB
testcase_05 AC 28 ms
23,796 KB
testcase_06 AC 27 ms
23,652 KB
testcase_07 AC 26 ms
23,820 KB
testcase_08 AC 27 ms
24,012 KB
testcase_09 AC 27 ms
24,264 KB
testcase_10 AC 28 ms
24,000 KB
testcase_11 AC 29 ms
23,532 KB
testcase_12 AC 29 ms
23,400 KB
testcase_13 AC 31 ms
23,400 KB
testcase_14 AC 32 ms
23,520 KB
testcase_15 AC 111 ms
24,024 KB
testcase_16 AC 44 ms
23,544 KB
testcase_17 AC 66 ms
23,352 KB
testcase_18 AC 68 ms
24,012 KB
testcase_19 AC 127 ms
23,640 KB
testcase_20 AC 212 ms
24,396 KB
testcase_21 AC 227 ms
23,556 KB
testcase_22 AC 322 ms
23,796 KB
testcase_23 AC 330 ms
23,628 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

//template
#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define rrep(i,a,b) for(int i=(a);i>(b);i--)
#define ALL(v) (v).begin(),(v).end()
typedef long long int ll; const int inf = 0x3fffffff; const ll INF = 0x3fffffffffffffff;
template<class T> inline bool chmax(T& a,T b){ if(a<b){a=b;return 1;}return 0; }
template<class T> inline bool chmin(T& a,T b){ if(a>b){a=b;return 1;}return 0; }
//template end



int main(){
    int n; scanf("%d",&n);
    bool expo[1010]={};
    rep(i,0,n){
        printf("? %d\n",n-1);
        rep(j,0,n)if(i!=j)printf("%d ",j+1);
        fflush(stdout);
        int tmp; scanf("%d",&tmp);
        expo[i]=!tmp;
    }
    int cnt=0;
    rep(i,0,n)if(expo[i])cnt++;
    printf("! %d\n",cnt);
    rep(i,0,n)if(expo[i])printf("%d ",i+1);
    fflush(stdout);
    return 0;
}
0