結果
問題 | No.447 ゆきこーだーの雨と雪 (2) |
ユーザー | compass19 |
提出日時 | 2016-11-19 17:08:10 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 990 bytes |
コンパイル時間 | 81 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 15,232 KB |
最終ジャッジ日時 | 2024-05-05 04:19:41 |
合計ジャッジ時間 | 2,912 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 31 ms
10,880 KB |
testcase_01 | AC | 33 ms
10,880 KB |
testcase_02 | AC | 33 ms
10,880 KB |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | WA | - |
testcase_24 | WA | - |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | WA | - |
ソースコード
from collections import defaultdict i=input p_num = int(i()) l = list(map(int, i().split())) t_num = int(i()) t_list = [] name_dict = {} alpa_list = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'] ster = {alpa: l[j] for j, alpa in enumerate(alpa_list[:p_num])} ac_list = {alpa: 1 for alpa in alpa_list[:p_num]} data_dic = {} name_set = set() for j in range(t_num): name, p = i().split() t_list.append((name, p)) name_dict[name] = j if name not in name_set: data_dic[name] = defaultdict(int) name_set.add(name) score = 50*ster[p] + int(50*ster[p] / (0.8 + 0.2*ac_list[p])) data_dic[name][p] = score data_dic[name]['_sum'] += score ac_list[p] += 1 ranking = sorted(data_dic.keys(), key=lambda x: (-data_dic[x]['_sum'], name_dict[x])) for i, name in enumerate(ranking): print(i+1, name, end=' ') for p in alpa_list[:p_num]: print(data_dic[name][p], end=' ') print(data_dic[name]['_sum'])