結果
| 問題 |
No.628 Tagの勢い
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-02-18 17:16:17 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 38 ms / 2,000 ms |
| コード長 | 341 bytes |
| コンパイル時間 | 283 ms |
| コンパイル使用メモリ | 12,288 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-10-06 15:39:11 |
| 合計ジャッジ時間 | 1,710 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
from collections import defaultdict
N = int(input())
scores = defaultdict(lambda: 0)
for i in range(N):
input()
M, S = map(int, input().split())
tags = input().split()
for t in tags:
scores[t] += S
ranking = sorted(sorted(scores.items()), reverse=True, key=lambda x: x[1])
for item in ranking[:10]:
print(*item)