結果

問題 No.447 ゆきこーだーの雨と雪 (2)
ユーザー roarisroaris
提出日時 2019-08-20 11:54:28
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 68 ms / 2,000 ms
コード長 652 bytes
コンパイル時間 207 ms
コンパイル使用メモリ 10,792 KB
実行使用メモリ 10,072 KB
最終ジャッジ日時 2023-07-28 18:03:11
合計ジャッジ時間 2,415 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
8,100 KB
testcase_01 AC 17 ms
8,112 KB
testcase_02 AC 17 ms
8,132 KB
testcase_03 AC 27 ms
8,512 KB
testcase_04 AC 26 ms
8,672 KB
testcase_05 AC 38 ms
9,284 KB
testcase_06 AC 56 ms
10,072 KB
testcase_07 AC 37 ms
8,752 KB
testcase_08 AC 40 ms
9,440 KB
testcase_09 AC 52 ms
9,604 KB
testcase_10 AC 24 ms
8,712 KB
testcase_11 AC 29 ms
8,684 KB
testcase_12 AC 30 ms
9,048 KB
testcase_13 AC 46 ms
9,692 KB
testcase_14 AC 53 ms
9,592 KB
testcase_15 AC 30 ms
8,772 KB
testcase_16 AC 25 ms
8,924 KB
testcase_17 AC 28 ms
8,764 KB
testcase_18 AC 20 ms
8,668 KB
testcase_19 AC 68 ms
9,864 KB
testcase_20 AC 56 ms
9,948 KB
testcase_21 AC 29 ms
8,928 KB
testcase_22 AC 27 ms
8,752 KB
testcase_23 AC 35 ms
8,976 KB
testcase_24 AC 54 ms
9,516 KB
testcase_25 AC 66 ms
9,912 KB
testcase_26 AC 40 ms
9,020 KB
testcase_27 AC 39 ms
9,088 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import floor

N = int(input())
L = list(map(int, input().split()))
rank = [1] * N
alpha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
trans = {alpha[i]: i for i in range(26)}
T = int(input())
point = {}
last = {}

for i in range(T):
    name_i, pi = input().split()
    n = trans[pi]
    
    if name_i not in point:
        point[name_i] = [0] * N
    
    point[name_i][n] = floor(50 * L[n] + 50 * L[n] / (0.8 + 0.2 * rank[n]))
    rank[n] += 1
    last[name_i] = i

names = list(point.keys())
names.sort(key=lambda k: (-sum(point[k]), last[k]))

for i in range(len(names)):
    name_i = names[i]
    print(i+1, name_i, *point[name_i], sum(point[name_i]))
0