結果

問題 No.355 数当てゲーム(2)
ユーザー n_knuun_knuu
提出日時 2016-04-02 02:22:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 1,032 bytes
コンパイル時間 118 ms
コンパイル使用メモリ 10,960 KB
実行使用メモリ 24,596 KB
平均クエリ数 14.87
最終ジャッジ日時 2023-09-23 10:07:15
合計ジャッジ時間 6,795 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 50 ms
23,748 KB
testcase_01 AC 40 ms
23,844 KB
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 AC 40 ms
23,940 KB
testcase_06 AC 40 ms
23,772 KB
testcase_07 AC 43 ms
23,932 KB
testcase_08 AC 41 ms
23,792 KB
testcase_09 RE -
testcase_10 AC 41 ms
24,100 KB
testcase_11 RE -
testcase_12 RE -
testcase_13 AC 40 ms
24,236 KB
testcase_14 AC 40 ms
24,488 KB
testcase_15 AC 40 ms
23,916 KB
testcase_16 RE -
testcase_17 AC 40 ms
23,936 KB
testcase_18 AC 40 ms
24,276 KB
testcase_19 AC 41 ms
24,376 KB
testcase_20 AC 42 ms
23,816 KB
testcase_21 AC 41 ms
24,164 KB
testcase_22 AC 41 ms
24,548 KB
testcase_23 RE -
testcase_24 AC 41 ms
23,984 KB
testcase_25 RE -
testcase_26 AC 41 ms
24,304 KB
testcase_27 RE -
testcase_28 AC 41 ms
24,320 KB
testcase_29 AC 41 ms
24,468 KB
testcase_30 RE -
testcase_31 AC 41 ms
23,716 KB
testcase_32 AC 43 ms
24,352 KB
testcase_33 AC 41 ms
23,868 KB
testcase_34 AC 41 ms
23,932 KB
testcase_35 AC 41 ms
24,136 KB
testcase_36 AC 42 ms
23,864 KB
testcase_37 AC 42 ms
24,224 KB
testcase_38 AC 42 ms
23,948 KB
testcase_39 AC 41 ms
24,456 KB
testcase_40 AC 41 ms
24,432 KB
testcase_41 AC 42 ms
24,380 KB
testcase_42 AC 42 ms
24,152 KB
testcase_43 RE -
testcase_44 AC 43 ms
24,580 KB
testcase_45 AC 43 ms
24,100 KB
testcase_46 RE -
testcase_47 AC 42 ms
24,396 KB
testcase_48 RE -
testcase_49 RE -
testcase_50 AC 41 ms
24,536 KB
testcase_51 AC 42 ms
23,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def is_finish(x, y):
    return x == 4
l = list(range(4))
not_in = set(range(4, 10))
print(*l)
X, Y = map(int, input().split())
if is_finish(X, Y):
    exit(0)
for i in range(4):
    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 X == tmpx and Y == tmpy:
            ng.append(n)
        if tmpx > X:
            not_in.remove(n)
            not_in.add(l[i])
            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