結果

問題 No.447 ゆきこーだーの雨と雪 (2)
ユーザー roarisroaris
提出日時 2019-08-20 11:54:28
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 93 ms / 2,000 ms
コード長 652 bytes
コンパイル時間 179 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 12,672 KB
最終ジャッジ日時 2024-04-16 02:04:44
合計ジャッジ時間 2,852 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,880 KB
testcase_01 AC 32 ms
10,880 KB
testcase_02 AC 31 ms
10,880 KB
testcase_03 AC 41 ms
11,264 KB
testcase_04 AC 39 ms
11,136 KB
testcase_05 AC 57 ms
12,032 KB
testcase_06 AC 79 ms
12,672 KB
testcase_07 AC 55 ms
11,520 KB
testcase_08 AC 57 ms
11,776 KB
testcase_09 AC 73 ms
12,416 KB
testcase_10 AC 38 ms
11,136 KB
testcase_11 AC 44 ms
11,008 KB
testcase_12 AC 48 ms
11,392 KB
testcase_13 AC 66 ms
12,160 KB
testcase_14 AC 73 ms
12,288 KB
testcase_15 AC 45 ms
11,264 KB
testcase_16 AC 40 ms
11,264 KB
testcase_17 AC 42 ms
11,264 KB
testcase_18 AC 34 ms
11,136 KB
testcase_19 AC 93 ms
12,544 KB
testcase_20 AC 77 ms
12,288 KB
testcase_21 AC 44 ms
11,392 KB
testcase_22 AC 42 ms
11,136 KB
testcase_23 AC 51 ms
11,392 KB
testcase_24 AC 76 ms
12,032 KB
testcase_25 AC 90 ms
12,288 KB
testcase_26 AC 60 ms
11,520 KB
testcase_27 AC 57 ms
11,520 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