結果

問題 No.355 数当てゲーム(2)
ユーザー 👑 rin204rin204
提出日時 2022-03-23 16:41:36
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 102 ms / 2,000 ms
コード長 537 bytes
コンパイル時間 266 ms
コンパイル使用メモリ 86,900 KB
実行使用メモリ 87,800 KB
平均クエリ数 25.40
最終ジャッジ日時 2023-09-24 03:02:49
合計ジャッジ時間 8,399 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 100 ms
87,332 KB
testcase_01 AC 98 ms
87,264 KB
testcase_02 AC 102 ms
87,276 KB
testcase_03 AC 99 ms
87,184 KB
testcase_04 AC 97 ms
87,468 KB
testcase_05 AC 97 ms
87,440 KB
testcase_06 AC 97 ms
87,580 KB
testcase_07 AC 97 ms
87,696 KB
testcase_08 AC 97 ms
87,424 KB
testcase_09 AC 96 ms
87,620 KB
testcase_10 AC 97 ms
87,040 KB
testcase_11 AC 95 ms
87,084 KB
testcase_12 AC 97 ms
86,748 KB
testcase_13 AC 96 ms
87,156 KB
testcase_14 AC 96 ms
87,068 KB
testcase_15 AC 96 ms
87,572 KB
testcase_16 AC 94 ms
87,376 KB
testcase_17 AC 95 ms
87,416 KB
testcase_18 AC 92 ms
86,900 KB
testcase_19 AC 95 ms
87,300 KB
testcase_20 AC 98 ms
87,688 KB
testcase_21 AC 96 ms
87,024 KB
testcase_22 AC 95 ms
87,712 KB
testcase_23 AC 96 ms
87,532 KB
testcase_24 AC 100 ms
87,148 KB
testcase_25 AC 98 ms
87,080 KB
testcase_26 AC 95 ms
87,124 KB
testcase_27 AC 96 ms
87,148 KB
testcase_28 AC 95 ms
87,400 KB
testcase_29 AC 93 ms
87,656 KB
testcase_30 AC 95 ms
87,612 KB
testcase_31 AC 95 ms
87,792 KB
testcase_32 AC 96 ms
86,988 KB
testcase_33 AC 95 ms
87,400 KB
testcase_34 AC 96 ms
87,284 KB
testcase_35 AC 94 ms
87,252 KB
testcase_36 AC 96 ms
87,116 KB
testcase_37 AC 97 ms
87,004 KB
testcase_38 AC 95 ms
86,864 KB
testcase_39 AC 97 ms
87,048 KB
testcase_40 AC 95 ms
87,180 KB
testcase_41 AC 96 ms
86,868 KB
testcase_42 AC 97 ms
87,652 KB
testcase_43 AC 97 ms
87,656 KB
testcase_44 AC 95 ms
87,592 KB
testcase_45 AC 97 ms
87,484 KB
testcase_46 AC 98 ms
87,236 KB
testcase_47 AC 96 ms
87,800 KB
testcase_48 AC 97 ms
87,244 KB
testcase_49 AC 97 ms
87,336 KB
testcase_50 AC 96 ms
87,456 KB
testcase_51 AC 97 ms
87,404 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools

def ask(q):
    print(*q, flush=True)
    x, y = map(int, input().split())
    if x == 4:
        exit()
    return x, y

ans = [0] * 10
for i in range(3, 10):
    x, y = ask((0, 1, 2, i))
    ans[i] = x + y
mi = min(ans[3:10])
lst = []
for i in range(3, 10):
    if len(lst) < 3 and ans[i] == mi:
        lst.append(i)
        
in_ = []
for i in range(10):
    if i in lst:
        continue
    x, y = ask(lst + [i])
    if x + y > 0:
        in_.append(i)
        
for lst in itertools.permutations(in_):
    ask(lst)
0