結果

問題 No.447 ゆきこーだーの雨と雪 (2)
ユーザー h_nosonh_noson
提出日時 2017-01-26 18:32:35
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 91 ms / 2,000 ms
コード長 586 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 10,852 KB
実行使用メモリ 10,224 KB
最終ジャッジ日時 2023-08-25 00:04:10
合計ジャッジ時間 2,981 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,840 KB
testcase_01 AC 15 ms
7,932 KB
testcase_02 AC 15 ms
7,844 KB
testcase_03 AC 26 ms
8,312 KB
testcase_04 AC 25 ms
8,368 KB
testcase_05 AC 44 ms
9,560 KB
testcase_06 AC 70 ms
10,000 KB
testcase_07 AC 41 ms
8,884 KB
testcase_08 AC 46 ms
9,236 KB
testcase_09 AC 63 ms
9,940 KB
testcase_10 AC 24 ms
8,592 KB
testcase_11 AC 29 ms
8,608 KB
testcase_12 AC 33 ms
8,812 KB
testcase_13 AC 54 ms
9,740 KB
testcase_14 AC 62 ms
10,116 KB
testcase_15 AC 31 ms
8,592 KB
testcase_16 AC 27 ms
8,644 KB
testcase_17 AC 28 ms
8,256 KB
testcase_18 AC 19 ms
8,376 KB
testcase_19 AC 91 ms
10,224 KB
testcase_20 AC 69 ms
9,980 KB
testcase_21 AC 31 ms
8,816 KB
testcase_22 AC 27 ms
8,632 KB
testcase_23 AC 37 ms
8,588 KB
testcase_24 AC 67 ms
9,580 KB
testcase_25 AC 85 ms
9,992 KB
testcase_26 AC 46 ms
8,936 KB
testcase_27 AC 43 ms
8,732 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
l = list(map(int,input().split(' ')))
t = int(input())

s = {}
cnt = [0 for i in range(n)]
for i in range(t):
    name,p = input().split(' ')
    num = ord(p) - ord('A')
    cnt[num] += 1
    if not name in s:
        s[name] = [0 for j in range(n+2)]
    score = 50 * l[num] + 250 * l[num] // (4 + cnt[num])
    s[name][num] = score
    s[name][n] += score
    s[name][n+1] = i
ns = sorted(s.items(),key = lambda x: (-x[1][n],x[1][n+1]))
for i in range(len(ns)):
    print(i+1,ns[i][0],end=' ')
    for j in range(n+1):
        print(ns[i][1][j],end=' ')
    print("")
0