結果

問題 No.475 最終日 - Writerの怠慢
ユーザー yuppe19 😺
提出日時 2016-12-25 11:05:36
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 153 ms / 2,000 ms
コード長 575 bytes
コンパイル時間 1,219 ms
コンパイル使用メモリ 76,324 KB
実行使用メモリ 92,476 KB
最終ジャッジ日時 2024-12-24 01:37:04
合計ジャッジ時間 3,873 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

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()

posArr = []
for i in xrange(n):
    if i == writer_id:
        continue
    pos = bisect_right(score, writer_score - a[i])
    posArr.append(pos)

posArr.sort()
prob = 1.
for i in xrange(n-1):
    prob *= float(posArr[i] - i) / (n - i - 1)
print '{:.15f}'.format(abs(prob))
0