/ Vijos /

用户

个人简介

我是坏人

1066 1291 1324

1133 1034

zuo ye:1117 1121 1128

Central Order

var s:longint;

  n,k:byte;

procedure f(i,lp,last:byte);

var j,start:byte;

begin

  if (i=k)then begin

   if n-lpn-k+i then start:=n-k+i else start:=lp+last;

  for j:=start downto lp+((n-lp)div(k-i+1)) do

   f(i+1,j,j-lp);

end;

begin

readln(n,k);

f(1,0,n);

writeln(s);

end.