結果

問題 No.934 Explosive energy drink
ユーザー wait_sushiwait_sushi
提出日時 2019-11-29 22:33:20
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 331 ms / 2,000 ms
コード長 776 bytes
コンパイル時間 3,801 ms
コンパイル使用メモリ 149,940 KB
実行使用メモリ 24,348 KB
平均クエリ数 434.17
最終ジャッジ日時 2023-09-23 18:50:13
合計ジャッジ時間 7,803 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
24,348 KB
testcase_01 AC 331 ms
23,568 KB
testcase_02 AC 25 ms
24,012 KB
testcase_03 AC 156 ms
23,460 KB
testcase_04 AC 315 ms
23,400 KB
testcase_05 AC 24 ms
23,352 KB
testcase_06 AC 24 ms
23,616 KB
testcase_07 AC 23 ms
23,736 KB
testcase_08 AC 25 ms
24,024 KB
testcase_09 AC 26 ms
24,240 KB
testcase_10 AC 26 ms
23,604 KB
testcase_11 AC 26 ms
23,460 KB
testcase_12 AC 26 ms
23,652 KB
testcase_13 AC 29 ms
23,568 KB
testcase_14 AC 29 ms
23,976 KB
testcase_15 AC 107 ms
23,412 KB
testcase_16 AC 43 ms
23,532 KB
testcase_17 AC 64 ms
23,364 KB
testcase_18 AC 65 ms
23,412 KB
testcase_19 AC 120 ms
24,276 KB
testcase_20 AC 198 ms
23,568 KB
testcase_21 AC 222 ms
23,628 KB
testcase_22 AC 313 ms
23,364 KB
testcase_23 AC 313 ms
23,808 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include "bits/stdc++.h"
using namespace std;
typedef long long int ll;
typedef vector<ll> vl;
typedef pair<ll, ll> PP;
#define rep(i,n) for(ll i = 0; i < ll(n); i++)
#define all(v) v.begin() , v.end()
#define inputv(v,n) rep(i,n){\
    ll x;\
    cin>>x;\
    v.push_back(x);\
    }
const ll INF = 999999999999999;
const ll MOD = 1000000007;
ll a, b, c, d, e, f, p, t, x, y, z, q, m, n, r, h, k, w, l, ans = 0;
int main() {
	set<ll> A;
	cin >> n;
	rep(i, n) {
		cout << "? "<<n-1 << endl;
		fflush(stdout);
		rep(j, n) {
			if (i != j) {
				cout << j + 1 << " ";
			}
		}
		fflush(stdout);
		cin >> x;
		if (x == 1)A.insert(i);
	}

	cout << "! " << n - A.size() << endl;
	fflush(stdout);
	rep(i, n) {
		if (A.count(i) == 0)cout << i + 1 << " " << endl;
	}
	fflush(stdout);
}
0