結果
問題 | No.447 ゆきこーだーの雨と雪 (2) |
ユーザー | compass19 |
提出日時 | 2016-11-18 23:22:28 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 958 bytes |
コンパイル時間 | 177 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 13,696 KB |
最終ジャッジ日時 | 2024-05-04 18:50:01 |
合計ジャッジ時間 | 2,396 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 28 ms
10,880 KB |
testcase_01 | AC | 26 ms
11,008 KB |
testcase_02 | AC | 26 ms
10,880 KB |
testcase_03 | RE | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | RE | - |
testcase_07 | RE | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | RE | - |
testcase_11 | RE | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | RE | - |
testcase_16 | RE | - |
testcase_17 | RE | - |
testcase_18 | WA | - |
testcase_19 | RE | - |
testcase_20 | WA | - |
testcase_21 | RE | - |
testcase_22 | WA | - |
testcase_23 | RE | - |
testcase_24 | RE | - |
testcase_25 | RE | - |
testcase_26 | RE | - |
testcase_27 | RE | - |
ソースコード
i=input p_num = int(i()) l = list(map(int, i().split())) t_num = int(i()) t_list = [] name_list = {} for j in range(t_num): name, p = i().split() t_list.append((name, p)) name_list[name] = j alpa_list = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N'] l_list = {alpa: l[i] for i, alpa in enumerate(alpa_list[:p_num])} ac_list = {alpa: 1 for alpa in alpa_list[:p_num]} rank_dic = {} for name, p in t_list: if name not in rank_dic.keys(): rank_dic[name] = {alpa: 0 for alpa in alpa_list[:p_num]} rank_dic[name]['_sum'] = 0 score = 50*l_list[p] + int(50*l_list[p] / (0.8 + 0.2*ac_list[p])) rank_dic[name][p] = score rank_dic[name]['_sum'] += score ac_list[p] += 1 ranking = sorted(rank_dic.keys(), key=lambda x: (-rank_dic[x]['_sum'], name_list[x])) for i, name in enumerate(ranking): print(i+1, name, end=' ') for alpa in alpa_list[:p_num]: print(int(rank_dic[name][alpa]), end=' ') print(int(rank_dic[name]['_sum']))