結果

問題 No.934 Explosive energy drink
ユーザー season1618season1618
提出日時 2019-11-29 22:07:57
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 583 bytes
コンパイル時間 1,666 ms
コンパイル使用メモリ 167,440 KB
実行使用メモリ 24,312 KB
平均クエリ数 709.50
最終ジャッジ日時 2023-09-23 18:32:18
合計ジャッジ時間 7,236 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
24,264 KB
testcase_01 AC 336 ms
23,616 KB
testcase_02 AC 27 ms
23,628 KB
testcase_03 AC 171 ms
24,288 KB
testcase_04 AC 335 ms
24,048 KB
testcase_05 AC 26 ms
24,276 KB
testcase_06 AC 27 ms
23,688 KB
testcase_07 AC 26 ms
23,436 KB
testcase_08 RE -
testcase_09 AC 26 ms
23,436 KB
testcase_10 AC 27 ms
23,568 KB
testcase_11 AC 27 ms
24,264 KB
testcase_12 AC 28 ms
23,988 KB
testcase_13 AC 32 ms
23,592 KB
testcase_14 AC 33 ms
23,376 KB
testcase_15 AC 111 ms
23,376 KB
testcase_16 AC 46 ms
23,556 KB
testcase_17 AC 69 ms
24,264 KB
testcase_18 AC 68 ms
23,496 KB
testcase_19 AC 130 ms
24,300 KB
testcase_20 RE -
testcase_21 AC 237 ms
23,556 KB
testcase_22 AC 326 ms
23,772 KB
testcase_23 AC 333 ms
23,328 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
#define rep(i,x,y) for(int i=x;i<y;i++)
#define range(a) (a).begin(),(a).end()
#define print(A,n) rep(i,0,n){cout<<(i ? " ":"")<<A[i];}cout<<endl;
#define pprint(A,m,n) rep(j,0,m){print(A[j],n);}
const int mod=1e5;
const int size=1e5;
const long inf=1e9;
int main(){
	int N;cin>>N;
	vector<int> ans;int K=0;
	int query[N-1];int a;
	rep(i,0,N-1) query[i]=i+2;
	rep(i,1,N+1){
		cout<<"? "<<N-1<<endl;
		print(query,N-1);
        query[i-1]--;
		cin>>a;
		if(a==0){ ans.push_back(i); K++; }
	}
	cout<<"! "<<K<<endl;
	print(ans,ans.size());
}
0