結果

問題 No.447 ゆきこーだーの雨と雪 (2)
ユーザー 👑 rin204rin204
提出日時 2022-07-10 16:44:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 157 ms / 2,000 ms
コード長 574 bytes
コンパイル時間 309 ms
コンパイル使用メモリ 87,184 KB
実行使用メモリ 81,360 KB
最終ジャッジ日時 2023-09-01 23:43:41
合計ジャッジ時間 5,427 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,592 KB
testcase_01 AC 71 ms
71,576 KB
testcase_02 AC 69 ms
71,464 KB
testcase_03 AC 111 ms
78,040 KB
testcase_04 AC 106 ms
77,900 KB
testcase_05 AC 149 ms
79,848 KB
testcase_06 AC 154 ms
80,324 KB
testcase_07 AC 125 ms
78,196 KB
testcase_08 AC 143 ms
79,820 KB
testcase_09 AC 147 ms
80,456 KB
testcase_10 AC 107 ms
77,968 KB
testcase_11 AC 110 ms
77,880 KB
testcase_12 AC 137 ms
79,024 KB
testcase_13 AC 145 ms
80,324 KB
testcase_14 AC 150 ms
80,380 KB
testcase_15 AC 112 ms
77,864 KB
testcase_16 AC 98 ms
77,696 KB
testcase_17 AC 112 ms
78,036 KB
testcase_18 AC 93 ms
76,332 KB
testcase_19 AC 150 ms
81,152 KB
testcase_20 AC 152 ms
81,308 KB
testcase_21 AC 116 ms
78,032 KB
testcase_22 AC 113 ms
78,120 KB
testcase_23 AC 115 ms
78,268 KB
testcase_24 AC 149 ms
79,588 KB
testcase_25 AC 157 ms
81,360 KB
testcase_26 AC 129 ms
78,268 KB
testcase_27 AC 127 ms
78,156 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
L = list(map(int, input().split()))
cnt = [0] * n
score = {}
time = {}
T = int(input())
for i in range(T):
    name, p = input().split()
    p = ord(p) - 65
    if name not in score:
        score[name] = [0] * n
    time[name] = i
    cnt[p] += 1
    s = 50 * L[p] + int((50 * L[p]) / (0.8 + 0.2 * cnt[p]) + 0.00000001)
    score[name][p] += s
lst = []
for name in score:
    tmp = [name] + score[name] + [sum(score[name])] + [time[name]]
    lst.append(tmp)
lst.sort(key=lambda x:(-x[-2], x[-1]))
for i, row in enumerate(lst, 1):
    print(i, *row[:-1])

0