結果
| 問題 |
No.447 ゆきこーだーの雨と雪 (2)
|
| コンテスト | |
| ユーザー |
compass19
|
| 提出日時 | 2016-11-18 22:58:58 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 979 bytes |
| コンパイル時間 | 80 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 13,440 KB |
| 最終ジャッジ日時 | 2024-11-26 07:42:25 |
| 合計ジャッジ時間 | 2,103 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | WA * 10 RE * 15 |
ソースコード
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][p] = 50*l_list[p] + 50*l_list[p] / (0.8 + 0.2*ac_list[p])
ac_list[p] += 1
total_list = []
for name, val in rank_dic.items():
total_list.append((name, sum(val.values())))
total_list = sorted(total_list, key=lambda x: (-x[1], name_list[x[0]]))
for i, (name, _sum) in enumerate(total_list):
print('{0} {1} '.format(i+1, name), end='')
for j in rank_dic[name].values():
print('{} '.format(int(j)), end='')
print('{}'.format(int(_sum)))
compass19