結果

問題 No.934 Explosive energy drink
ユーザー 👑 obakyanobakyan
提出日時 2020-03-10 09:08:05
言語 Lua
(LuaJit 2.1.1696795921)
結果
AC  
実行時間 660 ms / 2,000 ms
コード長 384 bytes
コンパイル時間 61 ms
コンパイル使用メモリ 5,212 KB
実行使用メモリ 24,300 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-23 20:44:19
合計ジャッジ時間 6,691 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
23,580 KB
testcase_01 AC 660 ms
24,276 KB
testcase_02 AC 21 ms
23,652 KB
testcase_03 AC 296 ms
23,544 KB
testcase_04 AC 645 ms
23,748 KB
testcase_05 AC 22 ms
23,556 KB
testcase_06 AC 21 ms
23,316 KB
testcase_07 AC 21 ms
24,252 KB
testcase_08 AC 20 ms
23,316 KB
testcase_09 AC 22 ms
23,700 KB
testcase_10 AC 22 ms
23,472 KB
testcase_11 AC 22 ms
23,976 KB
testcase_12 AC 25 ms
23,400 KB
testcase_13 AC 30 ms
23,352 KB
testcase_14 AC 30 ms
23,352 KB
testcase_15 AC 185 ms
24,300 KB
testcase_16 AC 50 ms
23,304 KB
testcase_17 AC 94 ms
23,760 KB
testcase_18 AC 96 ms
24,264 KB
testcase_19 AC 223 ms
24,048 KB
testcase_20 AC 414 ms
23,400 KB
testcase_21 AC 435 ms
24,240 KB
testcase_22 AC 651 ms
24,240 KB
testcase_23 AC 648 ms
24,276 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

local n = io.read()
local t = {}
for i = 1, n do
  io.write("? " .. n - 1 .. "\n")
  local z = {}
  for j = 1, n do
    if i ~= j then table.insert(z, j) end
  end
  io.write(table.concat(z, " "))
  io.write("\n")
  io.flush()
  local ret = io.read()
  if ret == "0" then
    table.insert(t, i)
  end
end
io.write("! " .. #t .. "\n")
io.write(table.concat(t, " ") .. "\n")
io.flush()
0