結果

問題 No.447 ゆきこーだーの雨と雪 (2)
ユーザー rpy3cpprpy3cpp
提出日時 2016-11-18 23:28:46
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 67 ms / 2,000 ms
コード長 655 bytes
コンパイル時間 105 ms
コンパイル使用メモリ 10,820 KB
実行使用メモリ 10,208 KB
最終ジャッジ日時 2023-08-17 12:09:03
合計ジャッジ時間 2,273 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,812 KB
testcase_01 AC 15 ms
7,904 KB
testcase_02 AC 16 ms
7,808 KB
testcase_03 AC 26 ms
8,540 KB
testcase_04 AC 25 ms
8,408 KB
testcase_05 AC 39 ms
9,332 KB
testcase_06 AC 55 ms
10,208 KB
testcase_07 AC 36 ms
8,844 KB
testcase_08 AC 38 ms
9,208 KB
testcase_09 AC 51 ms
9,604 KB
testcase_10 AC 22 ms
8,552 KB
testcase_11 AC 27 ms
8,636 KB
testcase_12 AC 29 ms
8,836 KB
testcase_13 AC 45 ms
9,504 KB
testcase_14 AC 53 ms
9,840 KB
testcase_15 AC 28 ms
8,680 KB
testcase_16 AC 24 ms
8,688 KB
testcase_17 AC 27 ms
8,436 KB
testcase_18 AC 19 ms
8,476 KB
testcase_19 AC 67 ms
10,128 KB
testcase_20 AC 55 ms
9,864 KB
testcase_21 AC 28 ms
8,640 KB
testcase_22 AC 26 ms
8,448 KB
testcase_23 AC 33 ms
8,760 KB
testcase_24 AC 53 ms
9,472 KB
testcase_25 AC 64 ms
9,928 KB
testcase_26 AC 39 ms
8,940 KB
testcase_27 AC 37 ms
8,796 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
Ls = list(map(int, input().split()))
T = int(input())
scores = dict()
last_solved = dict()
nsolved = [0] * N
for t in range(T):
    name, P = input().split()
    p = ord(P) - ord('A')
    nsolved[p] += 1
    if name not in scores:
        scores[name] = [0] * (N + 1)
    scores[name][p] = 50 * Ls[p] + (500*Ls[p]//(8 + 2*nsolved[p]))
    last_solved[name] = t
total_order = []
for name, score_list in scores.items():
    total = sum(score_list)
    score_list[-1] = total
    total_order.append((-total, last_solved[name], name))
total_order.sort()
i = 0
for total, last, name in total_order:
    i += 1
    print(i, name, *scores[name])
0