結果

問題 No.475 最終日 - Writerの怠慢
ユーザー suppy193suppy193
提出日時 2017-02-10 14:32:59
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 419 bytes
コンパイル時間 463 ms
コンパイル使用メモリ 11,148 KB
実行使用メモリ 25,620 KB
最終ジャッジ日時 2023-08-27 06:52:13
合計ジャッジ時間 6,024 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 82 ms
19,772 KB
testcase_01 AC 83 ms
15,356 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 166 ms
21,536 KB
testcase_13 TLE -
testcase_14 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n, s, w_id = gets.strip.split(' ').map(&:to_i)
a = gets.strip.split(' ').map(&:to_i)
scores = []
(1..n - 1).each do |i|
	scores << (50 * s + 50 * s / (0.8 + 0.2 * i)).floor	
end
score_writer = a[w_id] + 100 * s
pro = 1.0
(0...n).each do |id|
	next if id == w_id
	count = 0
	scores.each do |score|
		if a[id] + score > score_writer
			count += 1
		else
			break
		end
	end
	pro *= (1.0 - count.to_f / (n - 1))
end

p pro
0