結果

問題 No.934 Explosive energy drink
ユーザー uzzyuzzy
提出日時 2019-11-29 22:26:27
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 276 ms / 2,000 ms
コード長 1,302 bytes
コンパイル時間 4,339 ms
コンパイル使用メモリ 181,916 KB
実行使用メモリ 24,252 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-23 18:47:02
合計ジャッジ時間 7,763 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
23,580 KB
testcase_01 AC 276 ms
24,180 KB
testcase_02 AC 27 ms
23,736 KB
testcase_03 AC 144 ms
23,544 KB
testcase_04 AC 274 ms
23,496 KB
testcase_05 AC 26 ms
24,252 KB
testcase_06 AC 26 ms
23,952 KB
testcase_07 AC 26 ms
23,736 KB
testcase_08 AC 26 ms
23,736 KB
testcase_09 AC 27 ms
24,216 KB
testcase_10 AC 26 ms
23,556 KB
testcase_11 AC 27 ms
23,544 KB
testcase_12 AC 28 ms
23,772 KB
testcase_13 AC 31 ms
24,252 KB
testcase_14 AC 32 ms
23,628 KB
testcase_15 AC 96 ms
23,724 KB
testcase_16 AC 40 ms
23,352 KB
testcase_17 AC 59 ms
23,964 KB
testcase_18 AC 61 ms
23,460 KB
testcase_19 AC 113 ms
23,328 KB
testcase_20 AC 180 ms
23,964 KB
testcase_21 AC 194 ms
23,340 KB
testcase_22 AC 271 ms
24,204 KB
testcase_23 AC 274 ms
23,328 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma GCC optimize ("O3")
#pragma GCC target ("avx")
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define Would
#define you
#define please

int N;
bool K[1000] = {0,0,0,1,1,0,0,1,0,1};
bool A[1000] = {};
string query() {
	string RA = "? " + to_string(N - 1) + "\n";
	rep(i, N) if(A[i]) RA += to_string(i + 1) + " ";
	RA.pop_back();
	cout << RA << endl;
	string ret;

	//ここにお試し処理
	//bool baku = 1;
	//rep(i, N) if (K[i] && !A[i]) {
	//	baku = 0;
	//}
	//if (baku) ret = "1";
	//else ret = "0";

	//ここに本番処理
	cin >> ret;

	return ret;
}

int main() {



	cin >> N;


	rep(i, N) {
		A[i] = 1;
	}

	vector<int> kotae;
	rep(i, N) {
		A[i] = 0;
		string S = query();
		if (S == "0") {
			kotae.pb(i + 1);
		}
		A[i] = 1;
	}

	string ans = "! ";
	ans += to_string((int)kotae.size());
	ans += '\n';
	rep(i, kotae.size()) ans += to_string(kotae[i]) + " ";
	ans.pop_back();

	co(ans);

	Would you please return 0;
}
0