結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
19,432 KB
testcase_01 AC 74 ms
15,056 KB
testcase_02 WA -
testcase_03 TLE -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
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
		end
	end
	pro *= (1 - count.to_f / (n - 1))
end

p pro
0