結果

問題 No.447 ゆきこーだーの雨と雪 (2)
ユーザー kohei2019kohei2019
提出日時 2022-01-29 08:01:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 171 ms / 2,000 ms
コード長 620 bytes
コンパイル時間 755 ms
コンパイル使用メモリ 87,136 KB
実行使用メモリ 80,328 KB
最終ジャッジ日時 2023-08-30 04:38:58
合計ジャッジ時間 6,656 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 94 ms
71,660 KB
testcase_01 AC 93 ms
71,616 KB
testcase_02 AC 93 ms
71,900 KB
testcase_03 AC 131 ms
77,852 KB
testcase_04 AC 129 ms
77,776 KB
testcase_05 AC 163 ms
79,712 KB
testcase_06 AC 167 ms
79,540 KB
testcase_07 AC 152 ms
78,412 KB
testcase_08 AC 161 ms
79,092 KB
testcase_09 AC 165 ms
80,024 KB
testcase_10 AC 130 ms
77,848 KB
testcase_11 AC 134 ms
77,784 KB
testcase_12 AC 159 ms
78,332 KB
testcase_13 AC 163 ms
79,408 KB
testcase_14 AC 165 ms
80,276 KB
testcase_15 AC 137 ms
77,444 KB
testcase_16 AC 121 ms
77,612 KB
testcase_17 AC 133 ms
77,540 KB
testcase_18 AC 119 ms
77,784 KB
testcase_19 AC 169 ms
80,328 KB
testcase_20 AC 168 ms
79,824 KB
testcase_21 AC 140 ms
77,852 KB
testcase_22 AC 136 ms
77,912 KB
testcase_23 AC 137 ms
77,568 KB
testcase_24 AC 167 ms
79,260 KB
testcase_25 AC 171 ms
80,060 KB
testcase_26 AC 146 ms
78,344 KB
testcase_27 AC 147 ms
78,592 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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])
0