結果

問題 No.447 ゆきこーだーの雨と雪 (2)
ユーザー roarisroaris
提出日時 2019-08-20 11:51:58
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 153 ms / 2,000 ms
コード長 652 bytes
コンパイル時間 535 ms
コンパイル使用メモリ 86,696 KB
実行使用メモリ 79,884 KB
最終ジャッジ日時 2023-07-28 18:02:30
合計ジャッジ時間 5,072 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,252 KB
testcase_01 AC 70 ms
71,232 KB
testcase_02 AC 69 ms
71,216 KB
testcase_03 AC 110 ms
77,860 KB
testcase_04 AC 109 ms
77,884 KB
testcase_05 AC 144 ms
79,628 KB
testcase_06 AC 148 ms
79,884 KB
testcase_07 AC 125 ms
78,164 KB
testcase_08 AC 143 ms
78,896 KB
testcase_09 AC 144 ms
79,832 KB
testcase_10 AC 108 ms
77,664 KB
testcase_11 AC 113 ms
77,976 KB
testcase_12 AC 133 ms
78,392 KB
testcase_13 AC 143 ms
79,460 KB
testcase_14 AC 147 ms
79,756 KB
testcase_15 AC 114 ms
77,940 KB
testcase_16 AC 102 ms
77,364 KB
testcase_17 AC 112 ms
78,000 KB
testcase_18 AC 93 ms
76,140 KB
testcase_19 AC 148 ms
79,684 KB
testcase_20 AC 152 ms
79,344 KB
testcase_21 AC 117 ms
77,620 KB
testcase_22 AC 115 ms
77,916 KB
testcase_23 AC 118 ms
77,732 KB
testcase_24 AC 146 ms
79,220 KB
testcase_25 AC 153 ms
79,372 KB
testcase_26 AC 125 ms
77,948 KB
testcase_27 AC 127 ms
77,964 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