結果

問題 No.3418 【絶望】30個並列ごちゃ混ぜHit&Blowで遊ぼう!
コンテスト
ユーザー titia
提出日時 2025-12-25 04:23:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 363 ms / 5,000 ms
コード長 985 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 461 ms
コンパイル使用メモリ 82,588 KB
実行使用メモリ 95,576 KB
スコア 9,803,123
平均クエリ数 1968.77
最終ジャッジ日時 2025-12-25 04:24:05
合計ジャッジ時間 38,449 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
純コード判定しない問題か言語
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 100
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys
input = sys.stdin.readline

from itertools import combinations,permutations
from random import randint,shuffle

X=list(range(10))

L=list(combinations(X,5))

USE=set()

while True:
    shuffle(L)
    x=L.pop()

    print("".join(map(str,x)),flush=True)

    C=0
    A=0
    for i in range(30):
        h,b=map(int,input().split())

        if h+b==5 and h!=5:
            C+=1
            A+=1
        if h==5 and b==0:
            A+=1
    if C==0 and A==30:
        break

    if C>0:
        L2=list(permutations(x))
        L2.pop(0)

        while True:
            shuffle(L2)

            x2=L2.pop()

            print("".join(map(str,x2)),flush=True)

            C=0

            for i in range(30):
                h,b=map(int,input().split())

                if h==5 and b==0:
                    C+=1
            if A==C:
                break

        if A==30:
            break
            
            
                
                    
        
    

0