結果

問題 No.447 ゆきこーだーの雨と雪 (2)
ユーザー kamomekamome
提出日時 2020-04-17 23:47:16
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 80 ms / 2,000 ms
コード長 1,339 bytes
コンパイル時間 271 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 13,440 KB
最終ジャッジ日時 2024-04-14 16:09:48
合計ジャッジ時間 3,125 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
11,008 KB
testcase_01 AC 30 ms
10,880 KB
testcase_02 AC 30 ms
10,880 KB
testcase_03 AC 43 ms
11,264 KB
testcase_04 AC 40 ms
11,136 KB
testcase_05 AC 62 ms
12,800 KB
testcase_06 AC 71 ms
12,928 KB
testcase_07 AC 55 ms
11,776 KB
testcase_08 AC 59 ms
12,160 KB
testcase_09 AC 73 ms
13,056 KB
testcase_10 AC 38 ms
11,264 KB
testcase_11 AC 45 ms
11,392 KB
testcase_12 AC 45 ms
11,648 KB
testcase_13 AC 64 ms
12,800 KB
testcase_14 AC 75 ms
13,056 KB
testcase_15 AC 45 ms
11,392 KB
testcase_16 AC 40 ms
11,264 KB
testcase_17 AC 44 ms
11,264 KB
testcase_18 AC 35 ms
11,008 KB
testcase_19 AC 80 ms
13,056 KB
testcase_20 AC 76 ms
13,440 KB
testcase_21 AC 45 ms
11,520 KB
testcase_22 AC 43 ms
11,264 KB
testcase_23 AC 51 ms
11,648 KB
testcase_24 AC 69 ms
12,544 KB
testcase_25 AC 78 ms
13,184 KB
testcase_26 AC 56 ms
11,776 KB
testcase_27 AC 54 ms
11,776 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=input()
magick_number=65 #ord("A")
L=list(map(int,input().split()))

paticipat={}
prob_solve = [1 for x in range(len(L))]
prob_star  =  L
def score (star,ac):
    # 50×★の数+50×★の数 / (0.8+ 0.2×ACの順位)
    return int(50 * star +50 * star /(0.8 + 0.2*ac))

T=int(input())
person,query=[],[]
for i in range(T):
    p,q=input().split()
    person.append(p)
    query.append(q)

for p in list(set(person)):
    paticipat[p]=[[0 for x in range(len(L))],0]
    #paticipat.append({"name":p,"score":[1 for x in range(len(L))]})
#for p,q in zip(person,query):
#    q=ord(q)-magick_number
#    paticipat[p][q]=score(prob_star[q],prob_solve[q])
#    prob_solve[q]=prob_solve[q]+1

for time in range(len(query)):
    p,q=person[time],ord(query[time])-magick_number
    paticipat[p][0][q]=score(prob_star[q],prob_solve[q])
    paticipat[p][1]=len(query)-time
    prob_solve[q]=prob_solve[q]+1

l_kekka=[]
for k in paticipat.keys():
    l_kekka.append({"name":k,"sum":sum(paticipat[k][0]),"time":paticipat[k][1]})
#    l_kekka.append([k,kekka[k]])

score_sorted = sorted(l_kekka,reverse=True, key=lambda x:(x["sum"],x["time"]))
#print(score_sorted)
#exit()
for i in range(len(score_sorted)):
    print("{} {} {} {}".format(i+1,score_sorted[i]["name"]," ".join(map(str,paticipat[score_sorted[i]["name"]][0])),score_sorted[i]["sum"]))
0