結果

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

ソースコード

diff #

T=[0,8,15,20,25,30,35,40,44,48,52,56,60,65,70,75,80,85,93,101]
Z=[0]*20
L=[0]*20
d=0
for t in range(int(input().split()[0])):
	N=map(int,input().split()[1:])
	a=[]
	for i in N:
		d+=1
		p=0
		while T[p]<=i:p+=1
		if Z[p]==0:L[p],Z[p]=d,1
		else:a.append(str(Z[p])+" "+str(d))
		if Z[p]>=4:Z[p]=0
	print(len(a))
	print("\n".join(a))
0