結果
| 問題 |
No.628 Tagの勢い
|
| コンテスト | |
| ユーザー |
kyo1
|
| 提出日時 | 2020-09-29 08:05:22 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 38 ms / 2,000 ms |
| コード長 | 367 bytes |
| コンパイル時間 | 181 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-07-03 12:30:45 |
| 合計ジャッジ時間 | 1,348 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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