結果

問題 No.934 Explosive energy drink
ユーザー Ogtsn99Ogtsn99
提出日時 2019-11-29 22:24:08
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 1,110 bytes
コンパイル時間 3,080 ms
コンパイル使用メモリ 168,564 KB
実行使用メモリ 24,276 KB
最終ジャッジ日時 2023-09-23 18:46:25
合計ジャッジ時間 9,272 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

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<<"?"<<' '<<cnt-1<<endl;
        rep(j,n){
            if(j == i) continue;
            else cout<<a[j]<<' ';
        }
        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.flush();
    return 0;  
}
0