結果

問題 No.628 Tagの勢い
ユーザー ああいい
提出日時 2022-03-30 19:13:16
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 95 ms / 2,000 ms
コード長 291 bytes
コンパイル時間 249 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 77,056 KB
最終ジャッジ日時 2024-11-15 09:44:50
合計ジャッジ時間 2,265 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

from collections import defaultdict
d = defaultdict(int)

for _ in range(N):
    n = input()
    M,S = map(int,input().split())
    for t in input().split():
        d[t] += S
l = []
for t in d:
    l.append((-d[t],t))
l.sort()
for p,t in l[:10]:
    p = -p
    print(t,p)
0