結果

問題 No.934 Explosive energy drink
ユーザー 夜
提出日時 2020-11-04 07:30:54
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 333 ms / 2,000 ms
コード長 757 bytes
コンパイル時間 851 ms
コンパイル使用メモリ 94,748 KB
実行使用メモリ 24,324 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-24 06:56:49
合計ジャッジ時間 5,640 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
23,328 KB
testcase_01 AC 333 ms
23,940 KB
testcase_02 AC 26 ms
23,292 KB
testcase_03 AC 167 ms
24,240 KB
testcase_04 AC 331 ms
24,000 KB
testcase_05 AC 26 ms
23,376 KB
testcase_06 AC 25 ms
24,324 KB
testcase_07 AC 25 ms
24,312 KB
testcase_08 AC 26 ms
23,340 KB
testcase_09 AC 25 ms
23,952 KB
testcase_10 AC 26 ms
23,556 KB
testcase_11 AC 26 ms
23,892 KB
testcase_12 AC 27 ms
23,352 KB
testcase_13 AC 31 ms
23,724 KB
testcase_14 AC 32 ms
23,352 KB
testcase_15 AC 110 ms
23,520 KB
testcase_16 AC 44 ms
23,340 KB
testcase_17 AC 67 ms
23,292 KB
testcase_18 AC 67 ms
23,592 KB
testcase_19 AC 128 ms
23,592 KB
testcase_20 AC 214 ms
23,388 KB
testcase_21 AC 231 ms
23,880 KB
testcase_22 AC 326 ms
23,280 KB
testcase_23 AC 332 ms
23,340 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <algorithm>
#include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <cmath>
#include <stdio.h>
#include <queue>
#include <deque>
#include <cstdio>
#include <set>
#include <map>
#include <bitset>
#include <stack>
#include <cctype>
using namespace std;
vector<int> ans;
int main() {
	int n;
	cin >> n;
	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;
		bool b;
		cin >> b;
		if (!b) {
			ans.emplace_back(i);
		}
	}
	cout << "! " << ans.size() << endl;
	for (int i = 0; i < ans.size(); i++) {
		cout << ans[i] << " ";
	}
	cout << endl;
}
0