結果
| 問題 |
No.475 最終日 - Writerの怠慢
|
| コンテスト | |
| ユーザー |
tails
|
| 提出日時 | 2016-12-25 00:29:50 |
| 言語 | Perl (5.40.0) |
| 結果 |
AC
|
| 実行時間 | 144 ms / 2,000 ms |
| コード長 | 254 bytes |
| コンパイル時間 | 74 ms |
| コンパイル使用メモリ | 5,376 KB |
| 実行使用メモリ | 21,792 KB |
| 最終ジャッジ日時 | 2024-12-24 01:31:54 |
| 合計ジャッジ時間 | 2,277 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 15 |
コンパイルメッセージ
Name "main::n" used only once: possible typo at Main.pl line 1. Main.pl syntax OK
ソースコード
($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;
tails