結果
| 問題 | No.628 Tagの勢い |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-08-17 00:41:31 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 26 ms / 2,000 ms |
| + 395µs | |
| コード長 | 381 bytes |
| 記録 | |
| コンパイル時間 | 56 ms |
| コンパイル使用メモリ | 15,232 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2026-09-09 20:00:04 |
| 合計ジャッジ時間 | 2,518 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
from collections import defaultdict
n = int(input())
Counter = defaultdict(int)
for _ in range(n):
input()
m, s = map(int, input().split())
T = list(input().split())
for i in range(m):
Counter[T[i]] += s
Rank = [(key, value) for key, value in Counter.items()]
Rank.sort(key=lambda x: (-x[1], x[0]))
for i in range(min(10, len(Rank))):
print(*Rank[i])