0

bai toan toi uu roi rac

Bài toán tối ưu rời rạc và Lượng cực đại

Bài toán tối ưu rời rạc và Lượng cực đại

Kỹ thuật lập trình

... i,j,First,Last,v:Integer; Begin Fillchar(TraceX,Sizeof(TraceX),0); Fillchar(TraceY,Sizeof(TraceY),0); First:=1;Last:=0; For i:=1 to m If x[s,i] inc(last); Queue[last]:=i; traceX[i]:=-1; end; While First0) then begin Inc(Last); Queue[Last]:=v; TraceX[v]:=j; ... Const InputFile=’Input.Txt’; OutputFile=’Output.Txt’; Var a,x:Array[1 100,1 100]of Integer; TraceX,TraceY:Array[1 100]of Integer; p:Array[1 100]of Integer; Start,Finish,n,m,s,t,Delta,No:Integer;...
  • 7
  • 1,005
  • 9
Bài toán tối ưu tìm kiếm nhị phân

Bài toán tối ưu tìm kiếm nhị phân

Kỹ thuật lập trình

... procedure trace; var i : integer; begin if not ok then exit; z := 0; i := t; repeat inc(z); kq[z] := i; i := đ[i]; until i = -1; end; (*********************) procedure xuly; begin search; trace; end;...
  • 7
  • 2,334
  • 62

Xem thêm