結果
| 問題 | No.628 Tagの勢い |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-02-24 11:09:37 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 59 ms / 2,000 ms |
| + 173µs | |
| コード長 | 326 bytes |
| 記録 | |
| コンパイル時間 | 75 ms |
| コンパイル使用メモリ | 81,948 KB |
| 実行使用メモリ | 85,564 KB |
| 最終ジャッジ日時 | 2026-10-12 13:56:06 |
| 合計ジャッジ時間 | 2,155 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
N = int(input())
dic = {}
for i in range(N):
no = int(input())
M, S = map(int, input().split())
tags = list(input().split())
for t in tags:
dic[t] = dic.get(t, 0) + S
l = [[k, v] for k, v in dic.items()]
l.sort(key = lambda x: (-x[1], x[0]))
for i in range(min(len(l), 10)):
print(l[i][0], l[i][1])