結果
問題 | No.447 ゆきこーだーの雨と雪 (2) |
ユーザー |
|
提出日時 | 2016-11-18 23:28:46 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 84 ms / 2,000 ms |
コード長 | 655 bytes |
コンパイル時間 | 88 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 12,672 KB |
最終ジャッジ日時 | 2024-11-26 08:38:25 |
合計ジャッジ時間 | 2,311 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 |
ソースコード
N = int(input())Ls = list(map(int, input().split()))T = int(input())scores = dict()last_solved = dict()nsolved = [0] * Nfor t in range(T):name, P = input().split()p = ord(P) - ord('A')nsolved[p] += 1if name not in scores:scores[name] = [0] * (N + 1)scores[name][p] = 50 * Ls[p] + (500*Ls[p]//(8 + 2*nsolved[p]))last_solved[name] = ttotal_order = []for name, score_list in scores.items():total = sum(score_list)score_list[-1] = totaltotal_order.append((-total, last_solved[name], name))total_order.sort()i = 0for total, last, name in total_order:i += 1print(i, name, *scores[name])