結果

問題 No.475 最終日 - Writerの怠慢
ユーザー fiordfiord
提出日時 2017-07-21 09:13:40
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 633 bytes
コンパイル時間 314 ms
コンパイル使用メモリ 82,688 KB
実行使用メモリ 88,192 KB
最終ジャッジ日時 2024-04-17 09:57:16
合計ジャッジ時間 2,819 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 46 ms
52,352 KB
testcase_01 AC 54 ms
60,672 KB
testcase_02 AC 55 ms
61,184 KB
testcase_03 AC 61 ms
64,000 KB
testcase_04 AC 141 ms
87,680 KB
testcase_05 AC 138 ms
88,064 KB
testcase_06 AC 132 ms
87,808 KB
testcase_07 AC 133 ms
88,064 KB
testcase_08 AC 133 ms
87,552 KB
testcase_09 AC 133 ms
88,192 KB
testcase_10 AC 132 ms
87,808 KB
testcase_11 AC 131 ms
87,552 KB
testcase_12 AC 98 ms
82,560 KB
testcase_13 AC 120 ms
86,912 KB
testcase_14 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
n, s, ID = map(int, input().split())
a = list(map(int, input().split()))
p = a[ID] + 100 * s
a.pop(ID)
a.sort()
ret = 1.0
for i in reversed(range(len(a))):
    # a[i]+50s+|50s/(0.8+0.2r)|<p
    l = 1
    r = n - 1
    if a[i] + 50 * s + math.floor(50 * s / (0.80 + 0.20 * (n - 1))) > p:
        l = n - 1
    if a[i] + 100 * s <= p:
        r = 1
    for t in range(20):
        mid = int((l + r) / 2.0)
        if a[i] + 50 * s + math.floor(50 * s / (0.80 + 0.20 * mid)) <= p:
            r = mid
        else:
            l = mid
    # r位以下ならOK->(i+2-r)/(i+1)
    ret *= max(i + 2 - r, 0) / (i + 1)
print(ret)
0