結果

問題 No.475 最終日 - Writerの怠慢
ユーザー yuppe19 😺yuppe19 😺
提出日時 2016-12-25 10:47:52
言語 Python2
(2.7.18)
結果
AC  
実行時間 155 ms / 2,000 ms
コード長 570 bytes
コンパイル時間 994 ms
コンパイル使用メモリ 6,616 KB
実行使用メモリ 13,724 KB
最終ジャッジ日時 2023-08-25 16:41:44
合計ジャッジ時間 3,217 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
5,812 KB
testcase_01 AC 11 ms
5,812 KB
testcase_02 AC 12 ms
6,000 KB
testcase_03 AC 24 ms
6,784 KB
testcase_04 AC 146 ms
13,588 KB
testcase_05 AC 140 ms
13,724 KB
testcase_06 AC 142 ms
13,512 KB
testcase_07 AC 144 ms
13,644 KB
testcase_08 AC 147 ms
13,588 KB
testcase_09 AC 155 ms
13,504 KB
testcase_10 AC 155 ms
13,600 KB
testcase_11 AC 155 ms
13,636 KB
testcase_12 AC 142 ms
13,524 KB
testcase_13 AC 151 ms
11,908 KB
testcase_14 AC 11 ms
5,820 KB
権限があれば一括ダウンロードができます

ソースコード

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