結果

問題 No.934 Explosive energy drink
ユーザー 沙耶花沙耶花
提出日時 2019-11-29 21:54:45
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 315 ms / 2,000 ms
コード長 608 bytes
コンパイル時間 5,299 ms
コンパイル使用メモリ 167,560 KB
実行使用メモリ 24,300 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-23 18:24:37
合計ジャッジ時間 6,165 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
23,328 KB
testcase_01 AC 314 ms
24,252 KB
testcase_02 AC 25 ms
23,508 KB
testcase_03 AC 161 ms
23,448 KB
testcase_04 AC 315 ms
23,952 KB
testcase_05 AC 25 ms
24,288 KB
testcase_06 AC 25 ms
23,952 KB
testcase_07 AC 26 ms
23,604 KB
testcase_08 AC 26 ms
23,772 KB
testcase_09 AC 25 ms
24,204 KB
testcase_10 AC 25 ms
23,952 KB
testcase_11 AC 27 ms
24,300 KB
testcase_12 AC 27 ms
23,340 KB
testcase_13 AC 30 ms
23,508 KB
testcase_14 AC 30 ms
23,940 KB
testcase_15 AC 108 ms
23,940 KB
testcase_16 AC 45 ms
23,520 KB
testcase_17 AC 65 ms
23,448 KB
testcase_18 AC 67 ms
23,580 KB
testcase_19 AC 125 ms
23,580 KB
testcase_20 AC 207 ms
23,340 KB
testcase_21 AC 221 ms
23,280 KB
testcase_22 AC 314 ms
24,276 KB
testcase_23 AC 315 ms
24,216 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define modulo 1000000007
#define mod(mod_x) ((((long long)mod_x+modulo))%modulo)
#define Inf 10000000



int main(){
	
	int N;
	cin>>N;
	vector<int> ans;
	for(int i=0;i<N;i++){
		cout<<"? "<<N-1<<endl;
		vector<int> Q;
		for(int j=0;j<N;j++){
			if(j==i)continue;
			Q.push_back(j+1);
		}
		for(int j=0;j<Q.size();j++){
			if(j!=0)cout<<' ';
			cout<<Q[j];
		}
		cout<<endl;
		int a;
		cin>>a;
		if(a==0)ans.push_back(i+1);		
	}
	
	cout<<"! "<<ans.size()<<endl;
	for(int i=0;i<ans.size();i++){
		if(i!=0)cout<<' ';
		cout<<ans[i];
	}
	cout<<endl;
	
	return 0;
}
0