結果
| 問題 |
No.447 ゆきこーだーの雨と雪 (2)
|
| ユーザー |
brthyyjp
|
| 提出日時 | 2022-02-17 20:34:23 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 117 ms / 2,000 ms |
| コード長 | 487 bytes |
| コンパイル時間 | 365 ms |
| コンパイル使用メモリ | 82,048 KB |
| 実行使用メモリ | 78,720 KB |
| 最終ジャッジ日時 | 2024-06-29 07:49:49 |
| 合計ジャッジ時間 | 3,787 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
ソースコード
n = int(input())
L = list(map(int, input().split()))
t = int(input())
from collections import defaultdict
D = defaultdict(lambda: [0]*(n+2))
C = [0]*n
for i in range(t):
s, p = map(str, input().split())
p = ord(p)-ord('A')
C[p] += 1
D[s][p] += int(50*L[p]+50*L[p]/(0.8+0.2*C[p]))
D[s][n] += int(50*L[p]+50*L[p]/(0.8+0.2*C[p]))
D[s][n+1] = i
D = list(D.items())
D.sort(key=lambda x: (-x[1][n], x[1][n+1]))
for i, (s, l) in enumerate(D):
print(i+1, s, *l[:-1])
brthyyjp