結果
問題 |
No.628 Tagの勢い
|
ユーザー |
![]() |
提出日時 | 2020-01-04 17:07:50 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 432 bytes |
コンパイル時間 | 173 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-22 20:51:26 |
合計ジャッジ時間 | 1,727 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 8 WA * 11 |
ソースコード
N = int(input()) ans = dict() for i in range(N): num = int(input()) M, score = map(int, input().split()) word = list(map(str, input().split())) for j in range(M): if word[j] in ans: ans[word[j]] += score else: ans[word[j]] = score ans = sorted(ans.items(), reverse=True, key=lambda x:x[1]) for i in range(min(len(ans), 10)): print(ans[i][0], ans[i][1])