結果
| 問題 |
No.447 ゆきこーだーの雨と雪 (2)
|
| ユーザー |
|
| 提出日時 | 2022-07-10 16:44:53 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 158 ms / 2,000 ms |
| コード長 | 574 bytes |
| コンパイル時間 | 349 ms |
| コンパイル使用メモリ | 82,688 KB |
| 実行使用メモリ | 80,000 KB |
| 最終ジャッジ日時 | 2025-01-03 12:59:38 |
| 合計ジャッジ時間 | 5,013 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
ソースコード
n = int(input())
L = list(map(int, input().split()))
cnt = [0] * n
score = {}
time = {}
T = int(input())
for i in range(T):
name, p = input().split()
p = ord(p) - 65
if name not in score:
score[name] = [0] * n
time[name] = i
cnt[p] += 1
s = 50 * L[p] + int((50 * L[p]) / (0.8 + 0.2 * cnt[p]) + 0.00000001)
score[name][p] += s
lst = []
for name in score:
tmp = [name] + score[name] + [sum(score[name])] + [time[name]]
lst.append(tmp)
lst.sort(key=lambda x:(-x[-2], x[-1]))
for i, row in enumerate(lst, 1):
print(i, *row[:-1])