結果

問題 No.355 数当てゲーム(2)
ユーザー n_knuun_knuu
提出日時 2016-04-02 02:46:58
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 990 bytes
コンパイル時間 71 ms
コンパイル使用メモリ 10,868 KB
実行使用メモリ 24,644 KB
平均クエリ数 17.08
最終ジャッジ日時 2023-09-23 23:34:32
合計ジャッジ時間 4,180 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
23,852 KB
testcase_01 AC 34 ms
24,372 KB
testcase_02 AC 32 ms
24,060 KB
testcase_03 AC 31 ms
24,188 KB
testcase_04 AC 32 ms
24,152 KB
testcase_05 AC 31 ms
24,056 KB
testcase_06 AC 32 ms
24,408 KB
testcase_07 AC 31 ms
24,368 KB
testcase_08 AC 32 ms
24,388 KB
testcase_09 AC 31 ms
23,988 KB
testcase_10 AC 36 ms
23,992 KB
testcase_11 AC 33 ms
24,268 KB
testcase_12 AC 33 ms
23,996 KB
testcase_13 AC 33 ms
24,572 KB
testcase_14 AC 34 ms
24,080 KB
testcase_15 AC 32 ms
23,956 KB
testcase_16 AC 31 ms
24,580 KB
testcase_17 AC 33 ms
23,764 KB
testcase_18 AC 31 ms
23,944 KB
testcase_19 AC 32 ms
23,940 KB
testcase_20 AC 31 ms
23,908 KB
testcase_21 AC 33 ms
24,528 KB
testcase_22 AC 31 ms
24,144 KB
testcase_23 AC 32 ms
24,240 KB
testcase_24 AC 32 ms
24,336 KB
testcase_25 AC 31 ms
24,296 KB
testcase_26 AC 32 ms
24,364 KB
testcase_27 AC 32 ms
24,260 KB
testcase_28 AC 31 ms
23,992 KB
testcase_29 AC 32 ms
24,204 KB
testcase_30 AC 31 ms
24,224 KB
testcase_31 AC 32 ms
23,876 KB
testcase_32 AC 32 ms
23,740 KB
testcase_33 AC 33 ms
24,112 KB
testcase_34 AC 32 ms
24,036 KB
testcase_35 AC 32 ms
24,056 KB
testcase_36 AC 33 ms
23,952 KB
testcase_37 AC 32 ms
24,124 KB
testcase_38 AC 33 ms
24,420 KB
testcase_39 AC 36 ms
24,204 KB
testcase_40 AC 34 ms
23,740 KB
testcase_41 AC 36 ms
24,408 KB
testcase_42 AC 35 ms
24,644 KB
testcase_43 AC 36 ms
24,300 KB
testcase_44 AC 32 ms
24,188 KB
testcase_45 AC 31 ms
24,144 KB
testcase_46 AC 33 ms
24,376 KB
testcase_47 AC 31 ms
24,336 KB
testcase_48 AC 32 ms
24,568 KB
testcase_49 AC 35 ms
24,444 KB
testcase_50 AC 33 ms
24,004 KB
testcase_51 AC 31 ms
23,988 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def is_finish(x, y):
    return x == 4
l = list(range(4))
a = set(range(10))
print(*l)
X, Y = map(int, input().split())
if is_finish(X, Y):
    exit(0)
for i in range(4):
    not_in = a - set(l)
    ng = []
    for n in not_in:
        tmpl = l[:]
        tmpl[i] = n
        print(*tmpl)
        tmpx, tmpy = map(int, input().split())
        if is_finish(tmpx, tmpy):
            exit(0)
        if tmpx <= X and tmpy <= Y:
            ng.append(n)
        if tmpx > X:
            l = tmpl[:]
            X, Y = tmpx, tmpy
            break
        elif tmpx < X:
            break
    else:
        for j in range(i+1, 4):
            tmpl = l[:]
            tmpl[i], tmpl[j] = tmpl[j], ng[0]
            print(*tmpl)
            tmpx, tmpy = map(int, input().split())
            if is_finish(tmpx, tmpy):
                exit(0)
            if tmpx > X:
                l = tmpl[:]
                X, Y = tmpx, tmpy
                break
        else:
            assert(0)
assert(0)
0