結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,920 KB
testcase_01 AC 16 ms
7,928 KB
testcase_02 AC 18 ms
7,996 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 182 ms
16,584 KB
testcase_07 AC 188 ms
16,640 KB
testcase_08 AC 186 ms
16,732 KB
testcase_09 AC 186 ms
16,576 KB
testcase_10 AC 186 ms
16,548 KB
testcase_11 AC 187 ms
16,544 KB
testcase_12 AC 167 ms
16,632 KB
testcase_13 AC 166 ms
13,384 KB
testcase_14 AC 16 ms
8,000 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*=1.0*(valid-solved)/(total-solved);	

print(ans)
0