結果

問題 No.447 ゆきこーだーの雨と雪 (2)
ユーザー brthyyjpbrthyyjp
提出日時 2022-02-17 20:34:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 193 ms / 2,000 ms
コード長 487 bytes
コンパイル時間 295 ms
コンパイル使用メモリ 86,960 KB
実行使用メモリ 80,324 KB
最終ジャッジ日時 2023-09-11 17:52:37
合計ジャッジ時間 6,571 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 93 ms
71,668 KB
testcase_01 AC 95 ms
71,516 KB
testcase_02 AC 91 ms
71,492 KB
testcase_03 AC 193 ms
77,720 KB
testcase_04 AC 129 ms
77,624 KB
testcase_05 AC 166 ms
79,264 KB
testcase_06 AC 165 ms
79,608 KB
testcase_07 AC 147 ms
78,432 KB
testcase_08 AC 158 ms
78,756 KB
testcase_09 AC 159 ms
79,380 KB
testcase_10 AC 129 ms
77,508 KB
testcase_11 AC 136 ms
77,692 KB
testcase_12 AC 158 ms
78,768 KB
testcase_13 AC 158 ms
79,088 KB
testcase_14 AC 159 ms
79,656 KB
testcase_15 AC 134 ms
77,968 KB
testcase_16 AC 122 ms
77,276 KB
testcase_17 AC 135 ms
77,956 KB
testcase_18 AC 116 ms
77,376 KB
testcase_19 AC 162 ms
80,324 KB
testcase_20 AC 165 ms
79,792 KB
testcase_21 AC 139 ms
78,268 KB
testcase_22 AC 136 ms
77,760 KB
testcase_23 AC 136 ms
78,144 KB
testcase_24 AC 163 ms
79,392 KB
testcase_25 AC 169 ms
79,528 KB
testcase_26 AC 146 ms
78,740 KB
testcase_27 AC 147 ms
78,468 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
L = list(map(int, input().split()))
t = int(input())
from collections import defaultdict
D = defaultdict(lambda: [0]*(n+2))
C = [0]*n
for i in range(t):
    s, p = map(str, input().split())
    p = ord(p)-ord('A')
    C[p] += 1
    D[s][p] += int(50*L[p]+50*L[p]/(0.8+0.2*C[p]))
    D[s][n] += int(50*L[p]+50*L[p]/(0.8+0.2*C[p]))
    D[s][n+1] = i
D = list(D.items())
D.sort(key=lambda x: (-x[1][n], x[1][n+1]))
for i, (s, l) in enumerate(D):
    print(i+1, s, *l[:-1])
0