結果
| 問題 | No.628 Tagの勢い | 
| コンテスト | |
| ユーザー |  trineutron | 
| 提出日時 | 2020-12-30 00:40:09 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 40 ms / 2,000 ms | 
| コード長 | 419 bytes | 
| コンパイル時間 | 92 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-10-06 08:47:51 | 
| 合計ジャッジ時間 | 1,488 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 19 | 
ソースコード
n = int(input())
d = {}
for i in range(n):
    no = int(input())
    m, s = map(int, input().split())
    tags = input().split()
    for tag in tags:
        if tag not in d:
            d[tag] = 0
        d[tag] += s
scores = list(d.items())
for i in range(len(scores)):
    scores[i] = (-scores[i][1], scores[i][0])
scores = sorted(scores)
for i in range(min(10, len(scores))):
    print(scores[i][1], -scores[i][0])
            
            
            
        