結果
| 問題 | No.628 Tagの勢い |
| コンテスト | |
| ユーザー |
kyo1
|
| 提出日時 | 2020-09-29 08:05:22 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 94 ms / 2,000 ms |
| + 790µs | |
| コード長 | 367 bytes |
| 記録 | |
| コンパイル時間 | 278 ms |
| コンパイル使用メモリ | 21,540 KB |
| 実行使用メモリ | 15,868 KB |
| 最終ジャッジ日時 | 2026-08-04 23:40:18 |
| 合計ジャッジ時間 | 3,703 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
ソースコード
from collections import defaultdict
from operator import itemgetter
N = int(input())
tags = defaultdict(int)
for _ in range(N):
_ = int(input())
m, s = map(int, input().split())
for t in input().split():
tags[t] += s
print(
"\n".join(
[" ".join(map(str, x)) for x in sorted(tags.items(), key=lambda x: (-x[1], x[0]))][:10]
)
)
kyo1