3
已采纳
一道经典的完全背包只不过是求方法数的。
for i:=1 to n do
begin
f[i]:=maxlongint;
for j:=1 to 10 do
if i>=j then f[i]:=min(f[i-j]+a[j],f[i]);
end;
答案是f[n];
1
0
0

