結果

問題 No.934 Explosive energy drink
ユーザー QCFiumQCFium
提出日時 2019-11-09 10:32:21
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 321 ms / 2,000 ms
コード長 532 bytes
コンパイル時間 1,415 ms
コンパイル使用メモリ 168,028 KB
実行使用メモリ 24,300 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-23 18:19:04
合計ジャッジ時間 6,194 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
24,036 KB
testcase_01 AC 321 ms
23,604 KB
testcase_02 AC 24 ms
23,844 KB
testcase_03 AC 160 ms
23,388 KB
testcase_04 AC 321 ms
23,592 KB
testcase_05 AC 23 ms
23,604 KB
testcase_06 AC 23 ms
23,640 KB
testcase_07 AC 23 ms
23,796 KB
testcase_08 AC 23 ms
23,352 KB
testcase_09 AC 25 ms
23,424 KB
testcase_10 AC 25 ms
24,300 KB
testcase_11 AC 25 ms
23,688 KB
testcase_12 AC 26 ms
23,496 KB
testcase_13 AC 30 ms
24,060 KB
testcase_14 AC 30 ms
23,988 KB
testcase_15 AC 109 ms
23,400 KB
testcase_16 AC 45 ms
23,424 KB
testcase_17 AC 65 ms
23,676 KB
testcase_18 AC 66 ms
23,400 KB
testcase_19 AC 125 ms
24,276 KB
testcase_20 AC 208 ms
23,484 KB
testcase_21 AC 224 ms
23,604 KB
testcase_22 AC 313 ms
23,664 KB
testcase_23 AC 320 ms
23,964 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

int ri() {
	int n;
	scanf("%d", &n);
	return n;
}

int main() {
	int n = ri();
	assert(n >= 3);
	std::vector<int> res;
	for (int i = 1; i <= n; i++) {
		std::cout << "? " << n - 1 << std::endl;
		for (int j = 1; j <= n; j++) if (i != j) std::cout << j << " ";
		std::cout << std::endl;
		if (!ri()) res.push_back(i);
	}
	std::cout << "! " << res.size() << std::endl;
	for (int i = 0; i < (int) res.size(); i++) {
		if (i) std::cout << " ";
		std::cout << res[i];
	}
	std::cout << std::endl;
	
	return 0;
}
0