結果

問題 No.934 Explosive energy drink
ユーザー auauaauaua
提出日時 2019-11-29 22:14:27
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 338 ms / 2,000 ms
コード長 621 bytes
コンパイル時間 3,222 ms
コンパイル使用メモリ 147,232 KB
実行使用メモリ 24,348 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-23 18:37:58
合計ジャッジ時間 8,154 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
23,460 KB
testcase_01 AC 337 ms
23,700 KB
testcase_02 AC 28 ms
23,988 KB
testcase_03 AC 172 ms
23,976 KB
testcase_04 AC 338 ms
23,784 KB
testcase_05 AC 28 ms
23,388 KB
testcase_06 AC 28 ms
23,880 KB
testcase_07 AC 27 ms
23,424 KB
testcase_08 AC 27 ms
24,036 KB
testcase_09 AC 28 ms
24,348 KB
testcase_10 AC 27 ms
23,352 KB
testcase_11 AC 28 ms
23,892 KB
testcase_12 AC 29 ms
23,400 KB
testcase_13 AC 34 ms
24,036 KB
testcase_14 AC 35 ms
24,228 KB
testcase_15 AC 114 ms
24,036 KB
testcase_16 AC 48 ms
23,652 KB
testcase_17 AC 68 ms
24,348 KB
testcase_18 AC 71 ms
24,228 KB
testcase_19 AC 132 ms
23,604 KB
testcase_20 AC 221 ms
23,460 KB
testcase_21 AC 235 ms
23,436 KB
testcase_22 AC 331 ms
24,048 KB
testcase_23 AC 335 ms
23,976 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#define REP(i,m,n) for(int i=(m);i<(n);i++)
#define rep(i,n) REP(i,0,n)
#define pb push_back
#define all(a) a.begin(),a.end() 
typedef long long ll;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const int inf=1e9+7;
int main(){
    ll n;cin>>n;
    vector<ll>ans(0);
    ll a;
    rep(i,n){
        cout<<'?'<<' '<<n-1<<endl;
        rep(j,n){
            if(i!=j)cout<<j+1<<' ';
        }
        cin>>a;
        if(!a)ans.pb(i+1);
        cout<<endl;
    }
    cout<<'!'<<' '<<ans.size()<<endl;
    rep(i,ans.size()){
        cout<<ans[i]<<' ';
    }
    cout<<endl;
}
0