結果

問題 No.355 数当てゲーム(2)
ユーザー kimiyukikimiyuki
提出日時 2016-06-05 19:49:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 516 bytes
コンパイル時間 161 ms
コンパイル使用メモリ 10,808 KB
実行使用メモリ 25,248 KB
平均クエリ数 47.98
最終ジャッジ日時 2023-09-23 10:46:36
合計ジャッジ時間 5,959 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 48 ms
24,712 KB
testcase_01 AC 47 ms
25,020 KB
testcase_02 AC 44 ms
24,588 KB
testcase_03 AC 46 ms
24,972 KB
testcase_04 AC 45 ms
24,528 KB
testcase_05 AC 45 ms
24,540 KB
testcase_06 RE -
testcase_07 AC 48 ms
24,924 KB
testcase_08 AC 45 ms
24,460 KB
testcase_09 AC 46 ms
24,660 KB
testcase_10 AC 44 ms
24,300 KB
testcase_11 AC 44 ms
25,076 KB
testcase_12 AC 43 ms
24,464 KB
testcase_13 AC 44 ms
24,776 KB
testcase_14 AC 44 ms
24,912 KB
testcase_15 AC 45 ms
24,496 KB
testcase_16 AC 43 ms
24,700 KB
testcase_17 AC 45 ms
25,248 KB
testcase_18 AC 44 ms
24,896 KB
testcase_19 AC 45 ms
24,856 KB
testcase_20 AC 45 ms
24,596 KB
testcase_21 AC 44 ms
24,364 KB
testcase_22 AC 45 ms
25,100 KB
testcase_23 RE -
testcase_24 AC 47 ms
24,864 KB
testcase_25 AC 43 ms
25,124 KB
testcase_26 AC 44 ms
24,992 KB
testcase_27 AC 45 ms
24,476 KB
testcase_28 AC 45 ms
24,504 KB
testcase_29 AC 45 ms
24,720 KB
testcase_30 AC 46 ms
24,812 KB
testcase_31 AC 46 ms
24,408 KB
testcase_32 AC 45 ms
24,560 KB
testcase_33 AC 45 ms
24,604 KB
testcase_34 RE -
testcase_35 AC 42 ms
24,688 KB
testcase_36 AC 44 ms
25,040 KB
testcase_37 AC 45 ms
24,748 KB
testcase_38 AC 44 ms
25,084 KB
testcase_39 AC 46 ms
24,636 KB
testcase_40 RE -
testcase_41 AC 44 ms
24,520 KB
testcase_42 AC 45 ms
24,608 KB
testcase_43 AC 46 ms
24,412 KB
testcase_44 AC 44 ms
25,100 KB
testcase_45 AC 48 ms
24,720 KB
testcase_46 AC 43 ms
24,696 KB
testcase_47 AC 44 ms
24,604 KB
testcase_48 AC 45 ms
24,540 KB
testcase_49 AC 46 ms
24,296 KB
testcase_50 AC 45 ms
24,916 KB
testcase_51 AC 45 ms
24,744 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
import sys
import random
import itertools
def query(a, b, c, d):
    print(a, b, c, d)
    sys.stdout.flush()
    x, y = map(int,input().split())
    if x == 4 and y == 0:
        sys.exit(0)
    return x, y
a = { 0, 1, 2, 3 }
x, y = query(*a)
while x + y < 4:
    u = random.choice(list(a))
    v = random.choice(list(set(range(10)) - a))
    b = (a - { u }) | { v }
    nx, ny = query(*b)
    if x + y < nx + ny:
        a, x, y = b, nx, ny
for a in itertools.permutations(a):
    query(*a)
0