結果

問題 No.355 数当てゲーム(2)
ユーザー rlangevinrlangevin
提出日時 2023-06-15 12:31:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 127 ms / 2,000 ms
コード長 620 bytes
コンパイル時間 1,379 ms
コンパイル使用メモリ 86,836 KB
実行使用メモリ 88,108 KB
平均クエリ数 36.96
最終ジャッジ日時 2023-09-05 17:49:40
合計ジャッジ時間 11,674 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
87,780 KB
testcase_01 AC 124 ms
88,048 KB
testcase_02 AC 124 ms
87,528 KB
testcase_03 AC 124 ms
87,896 KB
testcase_04 AC 123 ms
87,588 KB
testcase_05 AC 125 ms
87,672 KB
testcase_06 AC 121 ms
87,560 KB
testcase_07 AC 124 ms
87,760 KB
testcase_08 AC 123 ms
87,816 KB
testcase_09 AC 123 ms
87,572 KB
testcase_10 AC 122 ms
87,672 KB
testcase_11 AC 122 ms
87,324 KB
testcase_12 AC 124 ms
88,068 KB
testcase_13 AC 123 ms
87,384 KB
testcase_14 AC 122 ms
87,720 KB
testcase_15 AC 124 ms
87,620 KB
testcase_16 AC 125 ms
87,884 KB
testcase_17 AC 123 ms
87,188 KB
testcase_18 AC 123 ms
87,844 KB
testcase_19 AC 125 ms
87,228 KB
testcase_20 AC 125 ms
87,560 KB
testcase_21 AC 126 ms
87,644 KB
testcase_22 AC 127 ms
87,812 KB
testcase_23 AC 126 ms
87,632 KB
testcase_24 AC 124 ms
87,076 KB
testcase_25 AC 122 ms
87,488 KB
testcase_26 AC 123 ms
87,492 KB
testcase_27 AC 125 ms
87,556 KB
testcase_28 AC 121 ms
87,760 KB
testcase_29 AC 124 ms
87,320 KB
testcase_30 AC 126 ms
87,260 KB
testcase_31 AC 126 ms
87,560 KB
testcase_32 AC 124 ms
87,548 KB
testcase_33 AC 123 ms
87,904 KB
testcase_34 AC 123 ms
87,644 KB
testcase_35 AC 120 ms
88,108 KB
testcase_36 AC 126 ms
87,644 KB
testcase_37 AC 125 ms
87,520 KB
testcase_38 AC 123 ms
87,612 KB
testcase_39 AC 124 ms
87,360 KB
testcase_40 AC 123 ms
87,648 KB
testcase_41 AC 123 ms
88,040 KB
testcase_42 AC 127 ms
87,380 KB
testcase_43 AC 124 ms
87,540 KB
testcase_44 AC 126 ms
87,672 KB
testcase_45 AC 122 ms
87,220 KB
testcase_46 AC 121 ms
87,592 KB
testcase_47 AC 124 ms
87,796 KB
testcase_48 AC 120 ms
87,920 KB
testcase_49 AC 127 ms
87,724 KB
testcase_50 AC 122 ms
87,956 KB
testcase_51 AC 122 ms
87,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from collections import *
from itertools import *

def check(L):
    print(*L)
    sys.stdout.flush()
    x, y = map(int, input().split())
    if [x, y] == [4, 0]:
        exit()
    return x, y

x, y = check([0, 1, 2, 3])
default = x + y

L = [0, 1, 2, 3]
ans = set()

for i in range(4):
    D = defaultdict(list)
    ma = 0
    for j in range(4, 10):
        L[i] = j
        x, y = check(L)
        D[x + y].append(j)
        ma = max(ma, x + y)
        L[i] = i
    if ma == default + 1:
        for v in D[ma]:
            ans.add(v)
    else:
        ans.add(i)

for t in permutations(ans):
    check(t)
0