結果

問題 No.447 ゆきこーだーの雨と雪 (2)
ユーザー roaris
提出日時 2019-08-20 11:33:09
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 652 bytes
コンパイル時間 200 ms
コンパイル使用メモリ 82,396 KB
実行使用メモリ 79,068 KB
最終ジャッジ日時 2024-10-06 11:50:04
合計ジャッジ時間 4,399 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import floor

N = int(input())
L = list(map(int, input().split()))
rank = [1] * N
alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
trans = {alpha[i]: i for i in range(26)}
T = int(input())
point = {}
last = {}

for i in range(T):
    name_i, pi = input().split()
    n = trans[pi]
    
    if name_i not in point:
        point[name_i] = [0] * N
    
    point[name_i][n] = 50 * L[n] + floor(50 * L[n] / (0.8 + 0.2 * rank[n]))
    rank[n] += 1
    last[name_i] = i

names = list(point.keys())
names.sort(key=lambda k: (-sum(point[k]), last[k]))

for i in range(len(names)):
    name_i = names[i]
    print(i+1, name_i, *point[name_i], sum(point[name_i]))
0