結果
| 問題 | No.628 Tagの勢い |
| コンテスト | |
| ユーザー |
ohana
|
| 提出日時 | 2023-10-27 09:53:13 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 56 ms / 2,000 ms |
| + 46µs | |
| コード長 | 324 bytes |
| 記録 | |
| コンパイル時間 | 915 ms |
| コンパイル使用メモリ | 81,020 KB |
| 実行使用メモリ | 85,604 KB |
| 最終ジャッジ日時 | 2026-10-12 14:11:41 |
| 合計ジャッジ時間 | 2,110 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
ソースコード
n = int(input())
dt = {}
A = []
for i in range(n):
_ = input()
_, s = map(int, input().split())
T = input().split()
for t in T:
if not t in dt:
dt[t] = len(dt)
A.append([0, t])
A[dt[t]][0] += s
A.sort(key=lambda x: (-x[0], x[1]))
for a, b in A[:10]:
print(b, a)
ohana