結果

問題 No.934 Explosive energy drink
ユーザー stngstng
提出日時 2022-08-15 16:06:22
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 512 ms / 2,000 ms
コード長 590 bytes
コンパイル時間 296 ms
コンパイル使用メモリ 82,592 KB
実行使用メモリ 93,600 KB
平均クエリ数 709.25
最終ジャッジ日時 2024-04-10 03:38:58
合計ジャッジ時間 6,264 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
69,592 KB
testcase_01 AC 330 ms
93,600 KB
testcase_02 AC 63 ms
70,360 KB
testcase_03 AC 206 ms
93,184 KB
testcase_04 AC 512 ms
93,556 KB
testcase_05 AC 60 ms
69,608 KB
testcase_06 AC 59 ms
68,680 KB
testcase_07 AC 62 ms
69,324 KB
testcase_08 AC 59 ms
69,216 KB
testcase_09 AC 59 ms
70,136 KB
testcase_10 AC 61 ms
69,704 KB
testcase_11 AC 62 ms
69,892 KB
testcase_12 AC 73 ms
80,092 KB
testcase_13 AC 80 ms
81,688 KB
testcase_14 AC 83 ms
81,804 KB
testcase_15 AC 221 ms
93,428 KB
testcase_16 AC 100 ms
86,736 KB
testcase_17 AC 128 ms
92,704 KB
testcase_18 AC 139 ms
93,232 KB
testcase_19 AC 188 ms
92,700 KB
testcase_20 AC 244 ms
93,568 KB
testcase_21 AC 247 ms
93,296 KB
testcase_22 AC 305 ms
93,372 KB
testcase_23 AC 307 ms
93,428 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
val = n-1
kaku = []
for i in range(n):
    if val < 2:
        if i % 2 == 0:
            kaku.append(n-(i//2))
        else:
            kaku.append(i//2+1)
        break
    print("?",val,flush=True)
    a = kaku[:]
    for j in range(val-len(kaku)):
        a.append(j+i//2+i%2+1)
    a.sort()
    print(*a,flush=True)
    ans = input()
    if ans == "1":#不要
        val -= 1
    else:
        if i % 2 == 0:
            kaku.append(n-(i//2))
        else:
            kaku.append(i//2+1)
a = kaku[:]
a.sort()
print("!",len(a),flush=True)
print(*a,flush=True)
exit()
0