結果

問題 No.475 最終日 - Writerの怠慢
ユーザー yuppe19 😺
提出日時 2016-12-25 00:29:16
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 484 bytes
コンパイル時間 394 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 13,136 KB
最終ジャッジ日時 2024-12-14 18:49:19
合計ジャッジ時間 2,692 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python2
# -*- coding: utf-8 -*-
# †
from bisect import bisect_right

n, s, writer_id = map(int, raw_input().split())
a = map(int, raw_input().split())
score = []
for i in xrange(1, n):
    score.append(s * 50 + (s * 250) / (i + 4))
writer_score = a[writer_id] + score[0]
score.reverse()

prob = 1.0
for i in xrange(n):
    if i == writer_id:
        continue
    cnt = bisect_right(score, writer_score - a[i])
    prob *= float(cnt) / (n-1)

print '{:.15f}'.format(prob)
0