結果

問題 No.934 Explosive energy drink
ユーザー yuly3yuly3
提出日時 2020-01-07 13:52:31
言語 Nim
(2.0.2)
結果
AC  
実行時間 334 ms / 2,000 ms
コード長 384 bytes
コンパイル時間 6,149 ms
コンパイル使用メモリ 71,068 KB
実行使用メモリ 24,372 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-23 19:24:49
合計ジャッジ時間 10,975 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
24,048 KB
testcase_01 AC 323 ms
24,060 KB
testcase_02 AC 26 ms
23,664 KB
testcase_03 AC 167 ms
23,676 KB
testcase_04 AC 334 ms
23,676 KB
testcase_05 AC 29 ms
23,808 KB
testcase_06 AC 26 ms
23,676 KB
testcase_07 AC 26 ms
23,556 KB
testcase_08 AC 26 ms
24,012 KB
testcase_09 AC 27 ms
23,664 KB
testcase_10 AC 27 ms
23,832 KB
testcase_11 AC 27 ms
23,796 KB
testcase_12 AC 29 ms
23,436 KB
testcase_13 AC 33 ms
24,000 KB
testcase_14 AC 33 ms
23,556 KB
testcase_15 AC 109 ms
24,072 KB
testcase_16 AC 47 ms
23,688 KB
testcase_17 AC 65 ms
24,216 KB
testcase_18 AC 67 ms
24,372 KB
testcase_19 AC 129 ms
23,676 KB
testcase_20 AC 214 ms
24,312 KB
testcase_21 AC 227 ms
24,288 KB
testcase_22 AC 318 ms
23,424 KB
testcase_23 AC 327 ms
23,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sequtils, strutils

proc solve() =
    var N = stdin.readLine.parseInt()
    var M = N - 1

    var b: seq[int]
    for i in 1..N:
        var question = toSeq(1..N).filterIt(it != i)
        echo "? ", M
        echo join(question, " ")

        var ans = stdin.readLine.parseInt()
        if ans == 0:
            b.add(i)
    echo "! ", b.len
    echo join(b, " ")

solve()
0