【正文】
.k].w:=x。 ? if path[u].da then path[x^.k].d:=path[u].d else path[x^.k].d:=a。 ? end。 ? x:=x^.next。 ? end。 ? end。 ? If path[t].p0 then ? Begin ? u:=t。 a:=path[u].d。 ? repeat ? path[u].w^.f:=path[u].w^.f+a。 ? path[u].w^.g^.f:=path[u].w^.f。 ? u:=path[u].p。 ? until u=s。 ? End ? Until path[t].p=0。 ? End。 ? 輸出最大流的流量 ? Procedure answer。 ? Var I,tot:integer。 ? x:link。 ? Begin ? tot:=0。 ? for i:=1 to n do ? begin ? x:=d[i]。 ? while xnil do ? begin ? if x^.f0 then 輸出弧 (i,x^.k)及其流量 x^.f; ? if (i=s) and (x^.f0) then tot:=tot+x^.f。 ? x:=x^.next。 ? end。 ? end。 ? 輸出最大流量 tot; ? End。