結果
問題 |
No.628 Tagの勢い
|
ユーザー |
![]() |
提出日時 | 2018-07-10 22:28:43 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 150 ms / 2,000 ms |
コード長 | 785 bytes |
コンパイル時間 | 203 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 11,520 KB |
最終ジャッジ日時 | 2024-10-07 22:51:29 |
合計ジャッジ時間 | 1,870 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
N=int(input()) list1=[] list2=[] for i in range(N): a=input() b=input() b=b.rstrip().split(" ") b1=int(b[0]) b2=int(b[1]) c=input() c=c.rstrip().split(" ") for j in range(b1): if c[j] not in list1: list1.append(c[j]) list2.append([b2,c[j]]) #print(list1) #print(list2) list3=[] for k in range(len(list1)): list3.append([10000,list1[k]]) #print(list3) for l in range(len(list2)): for m in range(len(list3)): if list2[l][1]==list3[m][1]: list3[m][0]-=list2[l][0] list3.sort() #print(list3) if len(list3)<=10: i=0 for i in range(len(list3)): print(list3[i][1]+" "+str(10000-list3[i][0])) else: i=0 for i in range(10): print(list3[i][1]+" "+str(10000-list3[i][0]))