还是水题,接近于裸的spfa(个人比较喜欢用spfa,dijkstra不太喜欢用),代码附上 ; type link=^node; node=record t,d:longint; f:link; end; var n,m,s,i,j,u,v,w,max:longint; adj:array[..] of link; f:array[..] of longint; d,val:array[..] of longint; went:array[..] of boolean; procedure i…