結果

問題 No.475 最終日 - Writerの怠慢
ユーザー yuppe19 😺yuppe19 😺
提出日時 2016-12-25 11:05:36
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 575 bytes
コンパイル時間 2,077 ms
コンパイル使用メモリ 77,688 KB
実行使用メモリ 93,176 KB
最終ジャッジ日時 2023-08-25 16:41:52
合計ジャッジ時間 4,512 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
76,436 KB
testcase_01 AC 74 ms
76,368 KB
testcase_02 AC 89 ms
79,324 KB
testcase_03 AC 87 ms
79,452 KB
testcase_04 AC 115 ms
93,176 KB
testcase_05 AC 116 ms
92,916 KB
testcase_06 AC 118 ms
93,004 KB
testcase_07 AC 115 ms
93,144 KB
testcase_08 AC 116 ms
92,832 KB
testcase_09 AC 121 ms
93,072 KB
testcase_10 AC 113 ms
92,956 KB
testcase_11 AC 111 ms
93,024 KB
testcase_12 AC 106 ms
92,368 KB
testcase_13 AC 122 ms
92,048 KB
testcase_14 AC 69 ms
76,360 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(abs(prob))
0