結果

問題 No.475 最終日 - Writerの怠慢
ユーザー kimiyukikimiyuki
提出日時 2016-12-25 04:07:21
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 181 ms / 2,000 ms
コード長 367 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 10,684 KB
実行使用メモリ 17,068 KB
最終ジャッジ日時 2023-08-25 16:41:18
合計ジャッジ時間 2,695 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,916 KB
testcase_01 AC 16 ms
7,732 KB
testcase_02 AC 18 ms
7,836 KB
testcase_03 AC 30 ms
8,892 KB
testcase_04 AC 171 ms
16,528 KB
testcase_05 AC 181 ms
16,432 KB
testcase_06 AC 161 ms
16,476 KB
testcase_07 AC 162 ms
16,572 KB
testcase_08 AC 162 ms
16,624 KB
testcase_09 AC 164 ms
16,568 KB
testcase_10 AC 158 ms
16,532 KB
testcase_11 AC 163 ms
16,600 KB
testcase_12 AC 136 ms
17,068 KB
testcase_13 AC 139 ms
13,396 KB
testcase_14 AC 16 ms
7,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
n, s, writer_id = map(int, input().split())
a = list(map(int, input().split()))
score = lambda r: 50 * s + 250 * s // (4 + r)
self = a[writer_id] + score(1)
del a[writer_id]
a.sort()
p = 1.0
i = 0
for r in range(1, n):
    while i < len(a) and a[i] + score(r) <= self:
        i += 1
    p *= max(0, i-(r-1)) / (n-1 - (r-1))
print('%.12f' % p)
0