結果

問題 No.475 最終日 - Writerの怠慢
ユーザー tailstails
提出日時 2016-12-25 00:29:50
言語 Perl
(5.38.2)
結果
AC  
実行時間 118 ms / 2,000 ms
コード長 254 bytes
コンパイル時間 261 ms
コンパイル使用メモリ 5,304 KB
実行使用メモリ 20,456 KB
最終ジャッジ日時 2023-08-25 16:39:29
合計ジャッジ時間 2,137 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,108 KB
testcase_01 AC 2 ms
4,948 KB
testcase_02 AC 3 ms
5,268 KB
testcase_03 AC 12 ms
6,528 KB
testcase_04 AC 109 ms
20,244 KB
testcase_05 AC 107 ms
20,436 KB
testcase_06 AC 111 ms
20,356 KB
testcase_07 AC 112 ms
20,456 KB
testcase_08 AC 112 ms
20,268 KB
testcase_09 AC 115 ms
20,220 KB
testcase_10 AC 118 ms
20,268 KB
testcase_11 AC 115 ms
20,384 KB
testcase_12 AC 80 ms
20,148 KB
testcase_13 AC 67 ms
20,224 KB
testcase_14 AC 2 ms
4,700 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Name "main::n" used only once: possible typo at Main.pl line 1.
Main.pl syntax OK

ソースコード

diff #

($n,$s,$w)=<>=~/\d+/g;
@a=<>=~/\d+/g;
($w)=splice@a,$w,1;
@a=sort{$b<=>$a}@a;
@b=map{50*$s+int(250*$s/(4+$_))}1..@a;

$r=0;
$i=$#b;
eval{
for(@a){
	while($i>=0 && $b[$i]+$_<=$b[0]+$w){
		--$i;
	}
	++$j;
	$c+=log(@b-$i-$j)-log$j;
}
$r=exp$c;
};
print $r;
0