結果
| 問題 |
No.447 ゆきこーだーの雨と雪 (2)
|
| ユーザー |
|
| 提出日時 | 2022-01-29 08:01:01 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 123 ms / 2,000 ms |
| コード長 | 620 bytes |
| コンパイル時間 | 736 ms |
| コンパイル使用メモリ | 82,256 KB |
| 実行使用メモリ | 79,160 KB |
| 最終ジャッジ日時 | 2024-12-31 13:07:01 |
| 合計ジャッジ時間 | 4,809 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 25 |
ソースコード
import collections
N = int(input())
lsL = list(map(int,input().split()))
alp = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
T = int(input())
score = collections.defaultdict(lambda:[0]*N)
total = collections.defaultdict(lambda:(0,0))
rank = [1]*(N)
for i in range(T):
name,p = input().split()
pn = alp.index(p)
s = lsL[pn]
score[name][pn] = 50*s + 500*s//(8+2*rank[pn])
a,b = total[name]
total[name] = (a+score[name][pn],-i)
rank[pn] += 1
aa = []
for key,val in total.items():
aa.append((val[0],val[1],key))
aa.sort(reverse=True)
for i in range(len(aa)):
print(i+1,aa[i][2],*score[aa[i][2]],aa[i][0])