- 数的划分
- 2009-11-10 13:32:18 @
用了好几个DP公式都只有60
1 条评论
-
汪俊 LV 8 @ 2009-11-10 15:42:15
我的AC程序
var
n,k,i,j,m:longint;
f:array[0..200,0..6]of longint;
begin
readln(n,k);
for i:=1 to n do
f:=1;
f[0,0]:=1;
for j:=2 to k do
for i:=j to n do
if i-j>=0 then
f:=f+f;
writeln(f[n,k]);
end.
- 1