結果

問題 No.934 Explosive energy drink
ユーザー 👑 tatt61880tatt61880
提出日時 2021-03-28 14:07:58
言語 Kuin
(KuinC++ v.2021.9.17)
結果
AC  
実行時間 1,354 ms / 2,000 ms
コード長 648 bytes
コンパイル時間 2,236 ms
コンパイル使用メモリ 155,036 KB
実行使用メモリ 24,276 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-10-14 18:07:49
合計ジャッジ時間 15,373 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
24,048 KB
testcase_01 AC 1,294 ms
24,276 KB
testcase_02 AC 23 ms
23,340 KB
testcase_03 AC 609 ms
23,604 KB
testcase_04 AC 1,347 ms
23,568 KB
testcase_05 AC 24 ms
23,952 KB
testcase_06 AC 22 ms
23,652 KB
testcase_07 AC 23 ms
23,412 KB
testcase_08 AC 23 ms
24,024 KB
testcase_09 AC 24 ms
23,940 KB
testcase_10 AC 23 ms
23,520 KB
testcase_11 AC 24 ms
23,964 KB
testcase_12 AC 27 ms
23,532 KB
testcase_13 AC 33 ms
24,276 KB
testcase_14 AC 37 ms
23,544 KB
testcase_15 AC 356 ms
24,228 KB
testcase_16 AC 74 ms
23,748 KB
testcase_17 AC 163 ms
23,340 KB
testcase_18 AC 178 ms
23,460 KB
testcase_19 AC 482 ms
24,036 KB
testcase_20 AC 910 ms
23,376 KB
testcase_21 AC 1,002 ms
23,460 KB
testcase_22 AC 1,305 ms
23,424 KB
testcase_23 AC 1,354 ms
23,316 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

func main()
	var n: int :: cui@inputInt()
	var a: []bool :: #[n]bool
	var cnt: int :: 0
	for i(0, n - 1)
		var firstFlag: bool :: true
		do cui@print("? \{n - 1}\n")
		for j(0, n - 1)
			if(j <> i)
				do cui@print("\{firstFlag ?("", " ")}\{j + 1}")
				do firstFlag :: false
			end if
		end for
		do cui@print("\n")
		do cui@flush()
		if(cui@inputInt() = 0)
			do a[i] :: true
			do cnt :+ 1
		end if
	end for
	
	block
		do cui@print("! \{cnt}\n")
		var firstFlag: bool :: true
		for i(0, n - 1)
			if(a[i])
				do cui@print("\{firstFlag ?("", " ")}\{i + 1}")
				do firstFlag :: false
			end if
		end for
		do cui@print("\n")
	end block
end func
0