結果

問題 No.934 Explosive energy drink
ユーザー Ogtsn99Ogtsn99
提出日時 2019-11-29 22:29:09
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 298 ms / 2,000 ms
コード長 1,144 bytes
コンパイル時間 4,596 ms
コンパイル使用メモリ 167,596 KB
実行使用メモリ 24,384 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-23 18:48:32
合計ジャッジ時間 9,727 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 51 ms
23,688 KB
testcase_01 AC 296 ms
23,400 KB
testcase_02 AC 23 ms
24,084 KB
testcase_03 AC 146 ms
23,412 KB
testcase_04 AC 290 ms
23,436 KB
testcase_05 AC 24 ms
24,372 KB
testcase_06 AC 25 ms
23,760 KB
testcase_07 AC 23 ms
23,928 KB
testcase_08 AC 24 ms
23,400 KB
testcase_09 AC 25 ms
24,072 KB
testcase_10 AC 25 ms
24,336 KB
testcase_11 AC 25 ms
24,108 KB
testcase_12 AC 26 ms
23,400 KB
testcase_13 AC 29 ms
23,664 KB
testcase_14 AC 29 ms
24,096 KB
testcase_15 AC 97 ms
24,060 KB
testcase_16 AC 42 ms
24,384 KB
testcase_17 AC 61 ms
24,336 KB
testcase_18 AC 62 ms
23,796 KB
testcase_19 AC 114 ms
23,712 KB
testcase_20 AC 199 ms
23,748 KB
testcase_21 AC 208 ms
23,508 KB
testcase_22 AC 291 ms
23,400 KB
testcase_23 AC 298 ms
23,748 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rrep(i,n) for(int (i)=((n)-1);(i)>=0;(i)--)
#define itn int
#define all(x) (x).begin(),(x).end()
#define F first
#define S second
const long long INF = 1LL << 60;
const int MOD = 1000000007;
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
signed main(void){
    int n; cin>>n;
    int cnt = n;
    vector <int> a(n);
    rep(i,n){
        a[i] = i+1;
    }
    vector <int> tans;
    rep(i,n){
        cout<<"?"<<' '<<n-1<<endl;
        rep(j,n){
            if(j == i) continue;
            else cout<<a[j]<<' ';
        }
        cout<<endl;
        cout.flush();
        int ans;
        cin>>ans;
           
        if(ans == 0){
            tans.push_back(a[i]);
            
            cnt--;
        }

    }
    cout<<'!'<< ' '<< tans.size() <<endl;
    rep(i,tans.size()){
        cout<<tans[i]<<' ';
    }
    cout<<endl;
    cout.flush();
    return 0;  
}
0