Курсовая работа: Оптимальный раскрой материала с максимальной прибылью
currCut.i:=0;
end;
end;
end;
if (currCut.max_i=-1) or (currCut.i>currCut.max_i) then
begin
if j1<>0 then
begin
if currCut.c>maxCut.c then
begin
maxCut:=currCut;
end;
currCut:=cutRecords1[j1];
j1:=j1-1;
currCut.i:=currCut.i+1;
end
else
begin
break;
end;
end
else
begin
if (currCut.l>=l0) and (currCut.l<l) then
begin
if cutRecords[currCut.l].c+currCut.c>maxCut.c then
begin
maxCut:=cutRecords[currCut.l];
maxCut.c:=maxCut.c+currCut.c;