結果

問題 No.934 Explosive energy drink
ユーザー 👑 nullnull
提出日時 2019-12-17 23:44:55
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 287 ms / 2,000 ms
コード長 2,925 bytes
コンパイル時間 1,088 ms
コンパイル使用メモリ 134,724 KB
実行使用メモリ 24,228 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-23 19:18:55
合計ジャッジ時間 5,245 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
23,568 KB
testcase_01 AC 285 ms
23,304 KB
testcase_02 AC 23 ms
24,204 KB
testcase_03 AC 146 ms
23,604 KB
testcase_04 AC 286 ms
23,784 KB
testcase_05 AC 21 ms
23,376 KB
testcase_06 AC 22 ms
23,472 KB
testcase_07 AC 21 ms
24,228 KB
testcase_08 AC 24 ms
23,328 KB
testcase_09 AC 22 ms
24,156 KB
testcase_10 AC 20 ms
23,964 KB
testcase_11 AC 23 ms
23,532 KB
testcase_12 AC 23 ms
23,784 KB
testcase_13 AC 26 ms
23,472 KB
testcase_14 AC 27 ms
23,292 KB
testcase_15 AC 96 ms
23,640 KB
testcase_16 AC 37 ms
24,180 KB
testcase_17 AC 56 ms
23,292 KB
testcase_18 AC 58 ms
23,352 KB
testcase_19 AC 109 ms
23,352 KB
testcase_20 AC 187 ms
23,736 KB
testcase_21 AC 196 ms
23,964 KB
testcase_22 AC 282 ms
23,628 KB
testcase_23 AC 287 ms
24,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/*
このコード、と~おれ!
Be accepted!
∧_∧ 
(。・ω・。)つ━☆・*。
⊂   ノ    ・゜+.
 しーJ   °。+ *´¨)
          .· ´¸.·*´¨) ¸.·*¨)
		            (¸.·´ (¸.·'* ☆
					*/

#include <stdio.h>
#include <algorithm>
#include <string>
#include <cmath>
#include <cstring>
#include <vector>
#include <numeric>
#include <iostream>
#include <random>
#include <map>
#include <unordered_map>
#include <queue>
#include <regex>

#pragma GCC optimize("Ofast")
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define rep1(i, n) for(int i = 1; i <= (n); ++i)
#define rep2(i, n) for(int i = 2; i < (n); ++i)
#define repr(i, n) for(int i = n; i >= 0; --i)
#define reprm(i, n) for(int i = n - 1; i >= 0; --i)
#define printynl(a) printf(a ? "yes\n" : "no\n")
#define printyn(a) printf(a ? "Yes\n" : "No\n")
#define printYN(a) printf(a ? "YES\n" : "NO\n")
#define printin(a) printf(a ? "possible\n" : "inposible\n")
#define printdb(a) printf("%.50lf\n", a)//少数出力
#define printdbd(a) printf("%.16lf\n", a)//少数出力(桁少なめ)
#define prints(s) printf("%s\n", s.c_str())//string出力
#define all(x) (x).begin(), (x).end()
#define allsum(a, b, c) ((a + b) * c / 2)//等差数列の和、初項,末項,項数
#define pb push_back
#define priq priority_queue
#define rpriq priq<int, vector<int>, greater<int>>
#define deg_to_rad(deg) (((deg)/360.0)*2.0*PI)
#define rad_to_deg(rad) (((rad)/2.0/PI)*360.0)
#define Please return
#define AC 0

using ll = long long;

constexpr int INF = 1073741823;
constexpr int MINF = -1073741823;
constexpr ll LINF = ll(4661686018427387903);
constexpr ll MOD = 1000000007;
const double PI = acos(-1);

using namespace std;

void scans(string& str) {
	char c;
	str = "";
	scanf("%c", &c);
	if (c == '\n')scanf("%c", &c);//最初の改行対策
	while (c != '\n' && c != -1) {
		str += c;
		scanf("%c", &c);
	}
}

void scanc(char& str) {
	char c;
	scanf("%c", &c);
	if (c == -1)return;
	while (c == '\n') {
		scanf("%c", &c);
	}
	str = c;
}

double acot(double x) {
	return PI / 2 - atan(x);
}

/*-----------------------------------------ここからコード-----------------------------------------*/

ll nearPow2(ll n)//x以上の2のべき乗を返す
{
	// nが0以下の時は0とする。
	if (n <= 0) return 0;


	// (n & (n - 1)) == 0 の時は、nが2の冪乗であるため、そのままnを返す。
	if ((n & (n - 1)) == 0) return ll(n);

	// bitシフトを用いて、2の冪乗を求める。
	ll ret = 1;
	while (n > 0) { ret <<= 1; n >>= 1; }
	return ret;
}

int main() {

	int n;
	scanf("%d", &n);
	vector<int> ans;
	int a;
	rep(i, n) {
		printf("? %d\n", n - 1);
		rep(j, n)if (i != j)printf("%d ", j + 1);
		printf("\n");
		fflush(stdout);
		scanf("%d", &a);
		if (!a)ans.pb(i + 1);
	}
	printf("! %d\n", ans.size());
	for (auto aa : ans)printf("%d ", aa);

	Please AC;
}
0