結果

問題 No.475 最終日 - Writerの怠慢
ユーザー roarisroaris
提出日時 2019-12-17 23:07:00
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 116 ms / 2,000 ms
コード長 321 bytes
コンパイル時間 297 ms
コンパイル使用メモリ 86,664 KB
実行使用メモリ 93,184 KB
最終ジャッジ日時 2023-09-18 04:45:45
合計ジャッジ時間 2,992 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,152 KB
testcase_01 AC 69 ms
71,204 KB
testcase_02 AC 77 ms
71,376 KB
testcase_03 AC 83 ms
76,540 KB
testcase_04 AC 115 ms
92,480 KB
testcase_05 AC 114 ms
93,120 KB
testcase_06 AC 114 ms
92,608 KB
testcase_07 AC 116 ms
92,820 KB
testcase_08 AC 116 ms
93,184 KB
testcase_09 AC 113 ms
92,908 KB
testcase_10 AC 114 ms
92,616 KB
testcase_11 AC 115 ms
92,788 KB
testcase_12 AC 99 ms
91,336 KB
testcase_13 AC 103 ms
91,576 KB
testcase_14 AC 69 ms
71,056 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, S, writer_id = map(int, input().split())
a = list(map(int, input().split()))
W = a[writer_id]+100*S
a = [a[i] for i in range(N) if i!=writer_id]
a.sort(reverse=True)
j = N
ans = 1

for i in range(N-1):
    while a[i]+50*S+250*S//(4+j-1)<=W and j>1:
        j -= 1

    ans *= max(0, N-j-i)
    ans /= N-1-i

print(ans)
0