/ Vijos /

用户

  • 讨论 (1)
  • 贡献 (2)
  • 递交 (23)

最近创建的讨论

最近递交

状态 题目 递交者 时间 内存 语言 递交时间
P1057 盖房子 LAOZU 0ms 0 Bytes Pascal 15 年前
P1307 黑皮的正方形 LAOZU 0ms 0 Bytes Pascal 15 年前
P1021 Victoria的舞会1 LAOZU 0ms 0 Bytes Pascal 16 年前
P1100 加分二叉树 LAOZU 0ms 0 Bytes Pascal 16 年前
P1324 黑皮的蛋糕 LAOZU 0ms 0 Bytes Pascal 16 年前
P1007 绕钉子的长绳子 LAOZU 0ms 0 Bytes Pascal 16 年前
P1025 小飞侠的游园方案 LAOZU 0ms 0 Bytes Pascal 16 年前
P1097 合并果子 LAOZU 0ms 0 Bytes Pascal 16 年前
P1123 均分纸牌 LAOZU 0ms 0 Bytes Pascal 16 年前
P1324 黑皮的蛋糕 LAOZU 0ms 0 Bytes Pascal 16 年前

个人简介

我是坏人

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.