結果

問題 No.475 最終日 - Writerの怠慢
ユーザー 🐬hec🐬hec
提出日時 2016-12-25 00:21:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 149 ms / 2,000 ms
コード長 461 bytes
コンパイル時間 105 ms
コンパイル使用メモリ 10,784 KB
実行使用メモリ 16,980 KB
最終ジャッジ日時 2023-08-25 16:39:22
合計ジャッジ時間 2,536 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,972 KB
testcase_01 AC 17 ms
7,900 KB
testcase_02 AC 16 ms
8,008 KB
testcase_03 AC 27 ms
9,140 KB
testcase_04 AC 147 ms
16,444 KB
testcase_05 AC 141 ms
16,600 KB
testcase_06 AC 149 ms
16,616 KB
testcase_07 AC 146 ms
16,680 KB
testcase_08 AC 146 ms
16,600 KB
testcase_09 AC 143 ms
16,500 KB
testcase_10 AC 148 ms
16,680 KB
testcase_11 AC 140 ms
16,444 KB
testcase_12 AC 128 ms
16,980 KB
testcase_13 AC 123 ms
13,448 KB
testcase_14 AC 14 ms
7,960 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect

def yukicoder(s,r):
	base=50*s
	bonus=500*s//(8+2*r)
	return base+bonus

n,s,writer_id = list(map(int, input().split()))	
a = list(map(int, input().split()))
writer_score=a[writer_id]+100*s;

b=[]

for i in range(n):
	if i!=writer_id:
		b.append(a[i])

b.sort()
ans=1.0;
total=n-1;

for solved in range(total):
	add_score=yukicoder(s,solved+1)
	valid=bisect.bisect_right(b,writer_score-add_score)
	ans*=(valid-solved)/(total-solved);	

print(ans)
0