$/=$";($n,$s,$k)=<>; $s-=$k*$n*($n-1)/2; if($s>0){ $d[$s]=1; for$i(0..$n-1){ for$a(0..$s){ for$b(0..$s/($n-$i)){ $e[$a]+=$d[$a+$b*($n-$i)]; $e[$a]%=1e9+7; } } @d=@e;@e=(); } } print$d[0]+0;