結果

問題 No.447 ゆきこーだーの雨と雪 (2)
ユーザー 👑 KazunKazun
提出日時 2021-02-10 16:36:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 222 ms / 2,000 ms
コード長 646 bytes
コンパイル時間 363 ms
コンパイル使用メモリ 86,936 KB
実行使用メモリ 84,088 KB
最終ジャッジ日時 2023-09-22 11:04:21
合計ジャッジ時間 7,541 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 145 ms
77,928 KB
testcase_01 AC 164 ms
78,116 KB
testcase_02 AC 140 ms
77,920 KB
testcase_03 AC 191 ms
81,464 KB
testcase_04 AC 184 ms
81,576 KB
testcase_05 AC 213 ms
83,464 KB
testcase_06 AC 211 ms
83,324 KB
testcase_07 AC 203 ms
81,924 KB
testcase_08 AC 212 ms
82,348 KB
testcase_09 AC 211 ms
83,712 KB
testcase_10 AC 183 ms
81,360 KB
testcase_11 AC 192 ms
81,648 KB
testcase_12 AC 207 ms
81,740 KB
testcase_13 AC 213 ms
83,376 KB
testcase_14 AC 210 ms
84,084 KB
testcase_15 AC 191 ms
82,140 KB
testcase_16 AC 177 ms
81,512 KB
testcase_17 AC 192 ms
81,968 KB
testcase_18 AC 164 ms
79,428 KB
testcase_19 AC 211 ms
83,276 KB
testcase_20 AC 217 ms
84,088 KB
testcase_21 AC 197 ms
82,112 KB
testcase_22 AC 195 ms
82,080 KB
testcase_23 AC 200 ms
81,884 KB
testcase_24 AC 215 ms
83,020 KB
testcase_25 AC 222 ms
82,916 KB
testcase_26 AC 207 ms
81,880 KB
testcase_27 AC 201 ms
81,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
from string import ascii_uppercase as X

def get(Star,Rank):
    return 50*Star*(Rank+9)//(Rank+4)

N=int(input())
L={x:s for x,s in zip(X,map(int,input().split()))}
T=int(input())

Last=defaultdict(int)
Score=defaultdict(dict)
Sum=defaultdict(int)
Solved=defaultdict(int)

for t in range(T):
    Name,P=input().split()
    Solved[P]+=1
    Score[Name][P]=get(L[P],Solved[P])
    Sum[Name]+=get(L[P],Solved[P])
    Last[Name]=t

Y=sorted(Last.keys(),key=lambda x:(-Sum[x],Last[x]))
for rank,x in enumerate(Y,1):
    B=[]
    for i in range(N):
        B.append(Score[x].get(X[i],0))
    print(rank,x,*B,Sum[x])
0