結果

問題 No.447 ゆきこーだーの雨と雪 (2)
ユーザー roaris
提出日時 2019-08-20 11:49:46
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 670 bytes
コンパイル時間 160 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 79,488 KB
最終ジャッジ日時 2024-10-06 11:51:48
合計ジャッジ時間 4,148 ms
ジャッジサーバーID
(参考情報)
judge1 / 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] + 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, *list(map(floor, point[name_i])), floor(sum(point[name_i])))
0