結果
問題 |
No.628 Tagの勢い
|
ユーザー |
![]() |
提出日時 | 2020-05-10 20:26:14 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 35 ms / 2,000 ms |
コード長 | 386 bytes |
コンパイル時間 | 82 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-07-08 05:57:46 |
合計ジャッジ時間 | 1,385 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 19 |
ソースコード
import sys input=lambda: sys.stdin.readline().rstrip() n=int(input()) import collections D=collections.defaultdict(int) for _ in range(n): ni=int(input()) m,s=map(int,input().split()) T=[str(i) for i in input().split()] for t in T: D[t]+=-s Ans=sorted([(t,D[t]) for t in D.keys()],key=lambda x:(x[1],x[0])) if len(Ans)>10: Ans=Ans[:10] for a in Ans: x,y=a print(x,-y)