結果

問題 No.475 最終日 - Writerの怠慢
ユーザー fiordfiord
提出日時 2017-07-21 09:13:04
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 634 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 19,004 KB
最終ジャッジ日時 2024-04-17 09:57:13
合計ジャッジ時間 16,176 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
10,624 KB
testcase_01 AC 33 ms
10,752 KB
testcase_02 AC 46 ms
10,880 KB
testcase_03 AC 171 ms
11,648 KB
testcase_04 AC 1,470 ms
19,004 KB
testcase_05 AC 1,473 ms
18,872 KB
testcase_06 AC 1,504 ms
19,000 KB
testcase_07 AC 1,466 ms
18,868 KB
testcase_08 AC 1,408 ms
18,996 KB
testcase_09 AC 1,481 ms
18,992 KB
testcase_10 AC 1,434 ms
18,996 KB
testcase_11 AC 1,472 ms
18,868 KB
testcase_12 AC 1,400 ms
18,336 KB
testcase_13 AC 1,403 ms
16,104 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