結果

問題 No.934 Explosive energy drink
ユーザー furafura
提出日時 2020-05-06 03:22:36
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 315 ms / 2,000 ms
コード長 464 bytes
コンパイル時間 2,423 ms
コンパイル使用メモリ 199,892 KB
実行使用メモリ 24,384 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-24 03:27:11
合計ジャッジ時間 6,457 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
23,664 KB
testcase_01 AC 292 ms
24,384 KB
testcase_02 AC 20 ms
23,640 KB
testcase_03 AC 150 ms
24,084 KB
testcase_04 AC 315 ms
23,448 KB
testcase_05 AC 22 ms
24,072 KB
testcase_06 AC 20 ms
24,384 KB
testcase_07 AC 20 ms
24,372 KB
testcase_08 AC 21 ms
23,880 KB
testcase_09 AC 21 ms
23,472 KB
testcase_10 AC 21 ms
23,436 KB
testcase_11 AC 21 ms
23,448 KB
testcase_12 AC 23 ms
23,400 KB
testcase_13 AC 26 ms
24,372 KB
testcase_14 AC 26 ms
24,132 KB
testcase_15 AC 97 ms
23,472 KB
testcase_16 AC 35 ms
24,384 KB
testcase_17 AC 53 ms
24,120 KB
testcase_18 AC 57 ms
23,568 KB
testcase_19 AC 113 ms
23,592 KB
testcase_20 AC 188 ms
23,688 KB
testcase_21 AC 203 ms
23,844 KB
testcase_22 AC 284 ms
23,844 KB
testcase_23 AC 295 ms
23,604 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

int main(){
	int n; scanf("%d",&n);
	vector<int> ans;
	rep(i,n){
		printf("? %d\n",n-1);
		rep(j,n) if(j!=i) printf("%d%c",j+1,j<n-1&&(j<n-2||i<n-1)?' ':'\n');
		fflush(stdout);
		int res; scanf("%d",&res);
		if(res==0) ans.emplace_back(i);
	}

	printf("! %lu\n",ans.size());
	rep(i,ans.size()) printf("%d%c",ans[i]+1,i+1<ans.size()?' ':'\n');
	fflush(stdout);

	return 0;
}
0