結果
| 問題 | No.628 Tagの勢い |
| コンテスト | |
| ユーザー |
koheijkt
|
| 提出日時 | 2025-03-22 11:50:54 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 62 ms / 2,000 ms |
| + 645µs | |
| コード長 | 414 bytes |
| 記録 | |
| コンパイル時間 | 74 ms |
| コンパイル使用メモリ | 80,160 KB |
| 実行使用メモリ | 85,100 KB |
| 最終ジャッジ日時 | 2026-10-12 14:23:21 |
| 合計ジャッジ時間 | 2,153 ms |
|
ジャッジサーバーID (参考情報) |
judge4_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
from collections import defaultdict
N = int(input())
dd = defaultdict(int)
for _ in range(N):
n = int(input())
m, score = map(int, input().split())
words = list(input().split())
for word in words:
dd[word] += score
ans = sorted(dd.items())
ans.sort(key=lambda x: x[0])
ans.sort(key=lambda x: x[1], reverse=True)
for i in range(10):
if i == len(ans):
break
print(*ans[i])
koheijkt