結果

問題 No.934 Explosive energy drink
ユーザー kotatsugamekotatsugame
提出日時 2019-11-29 21:56:31
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 335 ms / 2,000 ms
コード長 351 bytes
コンパイル時間 707 ms
コンパイル使用メモリ 70,456 KB
実行使用メモリ 24,276 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-23 18:26:01
合計ジャッジ時間 5,425 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
23,796 KB
testcase_01 AC 334 ms
23,628 KB
testcase_02 AC 25 ms
24,276 KB
testcase_03 AC 169 ms
23,796 KB
testcase_04 AC 335 ms
23,964 KB
testcase_05 AC 26 ms
24,216 KB
testcase_06 AC 26 ms
23,616 KB
testcase_07 AC 25 ms
23,316 KB
testcase_08 AC 25 ms
23,784 KB
testcase_09 AC 25 ms
24,264 KB
testcase_10 AC 26 ms
23,808 KB
testcase_11 AC 26 ms
23,532 KB
testcase_12 AC 28 ms
24,000 KB
testcase_13 AC 31 ms
24,204 KB
testcase_14 AC 31 ms
23,364 KB
testcase_15 AC 111 ms
23,988 KB
testcase_16 AC 45 ms
23,604 KB
testcase_17 AC 67 ms
23,532 KB
testcase_18 AC 68 ms
23,964 KB
testcase_19 AC 131 ms
23,808 KB
testcase_20 AC 217 ms
24,252 KB
testcase_21 AC 232 ms
23,532 KB
testcase_22 AC 328 ms
23,364 KB
testcase_23 AC 332 ms
23,808 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp:5:1: 警告: ISO C++ では型の無い ‘main’ の宣言を禁止しています [-Wreturn-type]
    5 | main()
      | ^~~~

ソースコード

diff #

#include<iostream>
#include<vector>
using namespace std;
int N;
main()
{
	cin>>N;
	vector<int>s;
	for(int i=1;i<=N;i++)
	{
		cout<<"? "<<N-1<<endl;
		int f=0;
		for(int j=1;j<=N;j++)if(i!=j)cout<<(f++?" ":"")<<j;
		cout<<endl;
		cin>>f;if(!f)s.push_back(i);
	}
	cout<<"! "<<s.size()<<endl;
	int f=0;
	for(int v:s)cout<<(f++?" ":"")<<v;
	cout<<endl;
}
0