結果

問題 No.5004 Room Assignment
ユーザー negibose2020
提出日時 2021-12-02 12:11:56
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 920 bytes
コンパイル時間 1,271 ms
実行使用メモリ 99,152 KB
スコア 0
平均クエリ数 1.00
最終ジャッジ日時 2021-12-02 12:12:23
合計ジャッジ時間 24,853 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other RE * 100
権限があれば一括ダウンロードができます

ソースコード

diff #

stime=time.perf_counter()

T,R=map(int,input().split())
t=0
N=5400
uf=UnionFind(N+1)
p=[-1]*(N+1)
tick=[-1]*(N+1)


s=set()
# スキル値, プレイヤーi, 出現チック
s.add((-10000000,-1,-1))
s.add((100000000,-1,-1))
pi=1
t_ans=set()

fist=True
_pl=set()
used=set()

import bisect
while t<3600 :
    nowtime=time.perf_counter()
    L=list(map(int,input().split()))
    # if nowtime - stime >4.85:
    #     t+=1
    #     print(0)
    #     sys.stdout.flush()
    #     continue

    if fist == True and L[0]>3:
        for e in L[1:]:
            _pl.add(e)
        print(1)
        used.add(_pl.pop())
        used.add(_pl.pop())
        fist=False
        print(*used)
        t+=1
        continue

    if fist == False and len(_pl)>0:
        print(1)
        p=used.pop()
        pp=_pl.pop()
        used.add(p)
        used.add(pp)
        print(p,pp)
        t+=1
        continue

    t+=1
    continue
0