結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
10,752 KB
testcase_01 AC 26 ms
10,880 KB
testcase_02 AC 25 ms
11,008 KB
testcase_03 AC 37 ms
11,136 KB
testcase_04 AC 36 ms
11,008 KB
testcase_05 AC 52 ms
12,288 KB
testcase_06 AC 71 ms
12,928 KB
testcase_07 AC 49 ms
11,520 KB
testcase_08 AC 52 ms
11,776 KB
testcase_09 AC 67 ms
12,672 KB
testcase_10 AC 36 ms
11,008 KB
testcase_11 AC 38 ms
11,264 KB
testcase_12 AC 41 ms
11,392 KB
testcase_13 AC 60 ms
12,288 KB
testcase_14 AC 66 ms
12,544 KB
testcase_15 AC 39 ms
11,136 KB
testcase_16 AC 36 ms
11,264 KB
testcase_17 AC 38 ms
11,008 KB
testcase_18 AC 30 ms
10,880 KB
testcase_19 AC 86 ms
12,800 KB
testcase_20 AC 72 ms
12,800 KB
testcase_21 AC 39 ms
11,264 KB
testcase_22 AC 37 ms
11,008 KB
testcase_23 AC 45 ms
11,264 KB
testcase_24 AC 70 ms
12,032 KB
testcase_25 AC 81 ms
12,416 KB
testcase_26 AC 53 ms
11,520 KB
testcase_27 AC 50 ms
11,392 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import defaultdict

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] + 500 * L[p] // (8 + 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