結果
問題 |
No.447 ゆきこーだーの雨と雪 (2)
|
ユーザー |
👑 ![]() |
提出日時 | 2021-02-10 16:36:10 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 138 ms / 2,000 ms |
コード長 | 646 bytes |
コンパイル時間 | 233 ms |
コンパイル使用メモリ | 82,176 KB |
実行使用メモリ | 81,280 KB |
最終ジャッジ日時 | 2024-07-08 02:56:16 |
合計ジャッジ時間 | 5,215 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 |
ソースコード
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])