挂了3个点

var

n,m,t,k:longint;

f:array [0..3000,0..3000] of longint;

time:array [0..3000] of longint;

crop:array [0..3000,1..3] of longint;

procedure pai(l,r:longint);

var i,j,t,m:longint;

begin

i:=l; j:=r;

m:=time[(l+r) div 2];

repeat

while time[i]m do dec(j);

if ij;

if l=crop[c,2]) then

begin

money:=money+n*crop[c,3];

c:=0;

end;

if (c=0) and (timesk) then

begin

data2:=0;

for i:=0 to m do

begin

data:=dfs(times+1,i)-n*crop;

if data>data2 then data2:=data;

end;

money:=money+data2;

end;

f[times,t]:=money;

exit(money);

end;

begin

init;

fillchar(f,sizeof(f),255);

writeln(dfs(1,0));

end.

神牛们帮我看看!

4 条评论

  • 1

信息

ID
1623
难度
7
分类
动态规划 | 背包 点击显示
标签
递交数
2085
已通过
416
通过率
20%
被复制
2
上传者