結果

問題 No.475 最終日 - Writerの怠慢
ユーザー 6soukiti296soukiti29
提出日時 2017-03-22 20:33:23
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 477 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 10,908 KB
実行使用メモリ 16,808 KB
最終ジャッジ日時 2023-09-19 05:23:06
合計ジャッジ時間 2,127 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,880 KB
testcase_01 AC 17 ms
8,064 KB
testcase_02 AC 17 ms
7,924 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 86 ms
16,632 KB
testcase_07 AC 106 ms
16,560 KB
testcase_08 AC 102 ms
16,624 KB
testcase_09 AC 177 ms
16,564 KB
testcase_10 AC 127 ms
16,600 KB
testcase_11 AC 105 ms
16,788 KB
testcase_12 AC 62 ms
16,752 KB
testcase_13 AC 60 ms
14,444 KB
testcase_14 AC 16 ms
7,876 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
N,S,id = map(int,input().split())
A1 = list(map(int,input().split()))
writer = A1[id] + 100 * S
A1.pop(id)
A = sorted(A1, reverse = True)
P = 1
J = [50 * S + math.ceil((50 * S) / (0.8 + 0.2 * i)) for i in range(1,N + 1)]
if A[0] > writer:
	print(0)
else:
	for ai,a in enumerate(A):
		p = 0
		for i in range(N - ai - 1):
			if J[i] + a > writer:
				p = p + 1
			else:
				break
		if p == 0:
			break
		P = P * (1 - p / (N - ai - 1))
		if P == 0:
			break
	print(P)
0