結果

問題 No.447 ゆきこーだーの雨と雪 (2)
ユーザー convexineqconvexineq
提出日時 2021-02-09 05:00:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 178 ms / 2,000 ms
コード長 529 bytes
コンパイル時間 294 ms
コンパイル使用メモリ 86,856 KB
実行使用メモリ 80,588 KB
最終ジャッジ日時 2023-09-20 15:51:19
合計ジャッジ時間 6,359 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 94 ms
71,508 KB
testcase_01 AC 94 ms
71,672 KB
testcase_02 AC 100 ms
71,892 KB
testcase_03 AC 139 ms
77,964 KB
testcase_04 AC 142 ms
77,772 KB
testcase_05 AC 171 ms
79,688 KB
testcase_06 AC 173 ms
80,532 KB
testcase_07 AC 157 ms
78,472 KB
testcase_08 AC 163 ms
79,288 KB
testcase_09 AC 168 ms
80,124 KB
testcase_10 AC 132 ms
77,972 KB
testcase_11 AC 137 ms
77,888 KB
testcase_12 AC 162 ms
78,888 KB
testcase_13 AC 168 ms
79,444 KB
testcase_14 AC 167 ms
80,052 KB
testcase_15 AC 137 ms
78,084 KB
testcase_16 AC 125 ms
77,580 KB
testcase_17 AC 137 ms
78,016 KB
testcase_18 AC 120 ms
77,408 KB
testcase_19 AC 175 ms
80,588 KB
testcase_20 AC 173 ms
80,108 KB
testcase_21 AC 140 ms
77,792 KB
testcase_22 AC 141 ms
77,776 KB
testcase_23 AC 143 ms
77,928 KB
testcase_24 AC 174 ms
79,436 KB
testcase_25 AC 178 ms
79,864 KB
testcase_26 AC 148 ms
78,464 KB
testcase_27 AC 144 ms
78,476 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def f(n,k): return 50*n+500*n//(8+2*k)

n = int(input())
*a, = map(int,input().split())
T = int(input())

from collections import defaultdict
num = [0]*n
points = defaultdict(lambda : [0]*(n+1))
last = defaultdict(int)
for t in range(T):
    s,p = input().split()
    p = ord(p)-65
    num[p] += 1
    points[s][p] = f(a[p],num[p])
    last[s] = t

for k in points:
    points[k][-1] = sum(points[k])

for i,(tot,_,k) in enumerate(sorted([(lst[-1],-last[k],k) for k,lst in points.items()],reverse=1)):
    print(i+1,k,*points[k])
0