結果

問題 No.934 Explosive energy drink
ユーザー leaf_1415leaf_1415
提出日時 2019-11-29 21:50:44
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 315 ms / 2,000 ms
コード長 549 bytes
コンパイル時間 1,703 ms
コンパイル使用メモリ 60,428 KB
実行使用メモリ 24,336 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-23 18:22:50
合計ジャッジ時間 6,521 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
23,616 KB
testcase_01 AC 312 ms
23,472 KB
testcase_02 AC 27 ms
23,736 KB
testcase_03 AC 161 ms
23,976 KB
testcase_04 AC 314 ms
23,808 KB
testcase_05 AC 27 ms
23,388 KB
testcase_06 AC 26 ms
24,276 KB
testcase_07 AC 26 ms
23,352 KB
testcase_08 AC 26 ms
23,952 KB
testcase_09 AC 26 ms
23,520 KB
testcase_10 AC 27 ms
23,748 KB
testcase_11 AC 27 ms
24,168 KB
testcase_12 AC 28 ms
23,592 KB
testcase_13 AC 31 ms
23,976 KB
testcase_14 AC 31 ms
23,340 KB
testcase_15 AC 106 ms
24,312 KB
testcase_16 AC 46 ms
23,976 KB
testcase_17 AC 64 ms
23,352 KB
testcase_18 AC 64 ms
23,304 KB
testcase_19 AC 124 ms
23,808 KB
testcase_20 AC 203 ms
23,592 KB
testcase_21 AC 223 ms
24,276 KB
testcase_22 AC 306 ms
23,316 KB
testcase_23 AC 315 ms
24,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#define llint long long

using namespace std;

llint n;
vector<llint> ans;

int main(void)
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	
	cin >> n;
	
	llint res;
	for(int i = 1; i <= n; i++){
		cout << "? " << n-1 << endl;
		for(int j = 1; j <= n; j++){
			if(i == j) continue;
			cout << j << " ";
		}
		cout << endl;
		cin >> res;
		if(res == 0) ans.push_back(i);
	}
	
	cout << "! " << ans.size() << endl;
	for(int i = 0; i < ans.size(); i++) cout << ans[i] << " "; cout << endl;
	
	return 0;
}
0