結果

問題 No.447 ゆきこーだーの雨と雪 (2)
ユーザー H3PO4H3PO4
提出日時 2020-08-16 21:41:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 659 bytes
コンパイル時間 204 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 13,184 KB
最終ジャッジ日時 2024-04-19 18:32:21
合計ジャッジ時間 2,822 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,880 KB
testcase_01 AC 25 ms
10,880 KB
testcase_02 AC 26 ms
11,008 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict
from math import floor

en2asc = lambda s: ord(s) - 65

N = int(input())
L = tuple(map(int, input().split()))
T = int(input())

scoreboard = defaultdict(lambda: [[0] * N, 0])
AC_count = [1] * N
for time in range(T):
    name, p = input().split()
    p = en2asc(p)
    score = 50 * L[p] + floor(50 * L[p] / (0.8 + 0.2 * AC_count[p]))
    AC_count[p] += 1
    scoreboard[name][0][p] = score
    scoreboard[name][1] = time

scoreboard = [(k, v) for k, v in scoreboard.items()]
scoreboard.sort(key=lambda x: (-sum(x[1][0]), x[1][1]))
for i, user in enumerate(scoreboard, 1):
    print(i, user[0], *user[1][0], sum(user[1][0]))
0