結果

問題 No.934 Explosive energy drink
ユーザー tanimani364tanimani364
提出日時 2019-11-30 12:56:17
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 312 ms / 2,000 ms
コード長 1,232 bytes
コンパイル時間 1,715 ms
コンパイル使用メモリ 121,568 KB
実行使用メモリ 24,312 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-23 19:09:00
合計ジャッジ時間 5,922 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
23,484 KB
testcase_01 AC 312 ms
23,376 KB
testcase_02 AC 26 ms
23,508 KB
testcase_03 AC 158 ms
24,312 KB
testcase_04 AC 310 ms
23,604 KB
testcase_05 AC 27 ms
24,012 KB
testcase_06 AC 26 ms
24,300 KB
testcase_07 AC 25 ms
23,604 KB
testcase_08 AC 26 ms
23,760 KB
testcase_09 AC 27 ms
24,012 KB
testcase_10 AC 27 ms
24,012 KB
testcase_11 AC 27 ms
23,976 KB
testcase_12 AC 28 ms
23,496 KB
testcase_13 AC 30 ms
24,204 KB
testcase_14 AC 31 ms
23,376 KB
testcase_15 AC 105 ms
23,508 KB
testcase_16 AC 41 ms
24,216 KB
testcase_17 AC 63 ms
23,520 KB
testcase_18 AC 63 ms
23,376 KB
testcase_19 AC 122 ms
23,376 KB
testcase_20 AC 202 ms
23,496 KB
testcase_21 AC 215 ms
23,772 KB
testcase_22 AC 306 ms
23,376 KB
testcase_23 AC 310 ms
23,508 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
#include<map>
#include<set>
#include<cstdio>
#include<cmath>
#include<numeric>
#include<queue>
#include<stack>
#include<cstring>
#include<limits>
#include<functional>
#include<unordered_set>
#include<iomanip>
#include<cassert>
#define rep(i,a) for(int i=(int)0;i<(int)a;++i)
#define pb push_back
#define eb emplace_back
using ll=long long;
constexpr ll mod = 1e9 + 7;
constexpr ll INF = 1LL << 50;
 
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;
}
using namespace std;

void solve(){
    int n;
    cin>>n;
    vector<int>exp;
    rep(i,n){
        cout<<"? "<<n-1<<"\n";
        rep(j,n){
            if(i==j)continue;
            cout<<j+1<<" ";
        }
        cout<<endl;
        int ans;
        cin>>ans;
        if(!ans)exp.pb(i);
    }
    cout<<"! "<<exp.size()<<"\n";
    for(auto x:exp)cout<<x+1<<" ";
    cout<<endl;
}
 
signed main(){
	ios::sync_with_stdio(false);
    cin.tie(0);
	cout<<fixed<<setprecision(15);
	solve();
	return 0;
}
0