結果
| 問題 | No.628 Tagの勢い |
| コンテスト | |
| ユーザー |
trineutron
|
| 提出日時 | 2020-12-30 00:40:09 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 34 ms / 2,000 ms |
| + 452µs | |
| コード長 | 419 bytes |
| 記録 | |
| コンパイル時間 | 55 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 12,032 KB |
| 最終ジャッジ日時 | 2026-10-12 13:54:28 |
| 合計ジャッジ時間 | 1,789 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
n = int(input())
d = {}
for i in range(n):
no = int(input())
m, s = map(int, input().split())
tags = input().split()
for tag in tags:
if tag not in d:
d[tag] = 0
d[tag] += s
scores = list(d.items())
for i in range(len(scores)):
scores[i] = (-scores[i][1], scores[i][0])
scores = sorted(scores)
for i in range(min(10, len(scores))):
print(scores[i][1], -scores[i][0])
trineutron