結果

問題 No.355 数当てゲーム(2)
ユーザー zombietanzombietan
提出日時 2016-06-06 14:16:47
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 1,019 bytes
コンパイル時間 104 ms
コンパイル使用メモリ 10,808 KB
実行使用メモリ 24,652 KB
平均クエリ数 32.25
最終ジャッジ日時 2023-09-24 00:06:06
合計ジャッジ時間 4,773 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
24,340 KB
testcase_01 AC 34 ms
23,808 KB
testcase_02 AC 33 ms
23,976 KB
testcase_03 AC 33 ms
24,036 KB
testcase_04 AC 39 ms
24,484 KB
testcase_05 AC 38 ms
24,504 KB
testcase_06 AC 34 ms
24,372 KB
testcase_07 AC 32 ms
23,828 KB
testcase_08 AC 32 ms
24,108 KB
testcase_09 AC 32 ms
24,140 KB
testcase_10 AC 31 ms
24,652 KB
testcase_11 AC 34 ms
24,092 KB
testcase_12 AC 34 ms
24,084 KB
testcase_13 AC 33 ms
24,496 KB
testcase_14 AC 31 ms
24,248 KB
testcase_15 AC 32 ms
23,856 KB
testcase_16 AC 33 ms
24,056 KB
testcase_17 AC 32 ms
24,012 KB
testcase_18 AC 33 ms
23,984 KB
testcase_19 AC 35 ms
24,556 KB
testcase_20 AC 33 ms
24,500 KB
testcase_21 AC 33 ms
23,972 KB
testcase_22 AC 34 ms
24,100 KB
testcase_23 AC 34 ms
24,420 KB
testcase_24 AC 34 ms
24,064 KB
testcase_25 AC 35 ms
24,100 KB
testcase_26 AC 33 ms
24,076 KB
testcase_27 AC 35 ms
24,012 KB
testcase_28 AC 33 ms
24,048 KB
testcase_29 AC 33 ms
24,604 KB
testcase_30 AC 33 ms
24,164 KB
testcase_31 AC 34 ms
23,840 KB
testcase_32 AC 33 ms
24,136 KB
testcase_33 AC 36 ms
24,548 KB
testcase_34 AC 34 ms
24,012 KB
testcase_35 AC 31 ms
24,160 KB
testcase_36 AC 31 ms
23,860 KB
testcase_37 AC 32 ms
24,028 KB
testcase_38 AC 33 ms
24,432 KB
testcase_39 AC 33 ms
24,132 KB
testcase_40 AC 33 ms
24,488 KB
testcase_41 AC 34 ms
23,904 KB
testcase_42 AC 33 ms
24,424 KB
testcase_43 AC 33 ms
24,396 KB
testcase_44 AC 32 ms
24,012 KB
testcase_45 AC 34 ms
24,596 KB
testcase_46 AC 34 ms
24,572 KB
testcase_47 AC 33 ms
23,952 KB
testcase_48 AC 38 ms
23,796 KB
testcase_49 AC 33 ms
24,548 KB
testcase_50 AC 35 ms
24,168 KB
testcase_51 AC 33 ms
24,560 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from itertools import combinations as comb
from itertools import permutations as perm
print('0 1 2 3')
sys.stdout.flush()
hit, blow = map(int, input().split())
a = hit + blow
if hit == 4:
    exit()
print('4 5 6 7')
sys.stdout.flush()
hit, blow = map(int, input().split())
b = hit + blow
if hit == 4:
    exit()
c = 4 - (a + b)
#count = 0
for x in comb([0,1,2,3],a):
    for y in comb([4,5,6,7],b):
        for z in comb([8,9],c):
            #count += 1
            num4 = sum([list(x),list(y),list(z)],[])
            print('{} {} {} {}'.format(*num4))
            sys.stdout.flush()
            hit, blow = map(int, input().split())
            if hit == 4:
                exit()
            if hit + blow == 4:
                align = num4
                break
        else:
            continue
        break
    else:
        continue
    break

for j in perm(align):
    print('{} {} {} {}'.format(*j))
    sys.stdout.flush()
    hit, blow = map(int, input().split())
    if hit == 4:
        exit()
0