题意:对于一个点i,设f(i)=max{mindis[i,j]} (j≠i).
其中mindis是各个点对之间的最短路.求min{f(i)} (1<=i<=n).
分析:floyd求出最短路即可.
code:
var person,time,n,i,j,k,p,min,max,mini,minperson:longint; map:array[0..110,0..110] of longint; f:boolean;begin readln(n); while n<>0 do begin fillchar(map,sizeof(map),1); for i:=1 to n do begin read(p); for j:=1 to p do begin read(person,time); map[i,person]:=time; end; readln; end; for k:=1 to n do for i:=1 to n do for j:=1 to n do if map[i,k]+map[k,j]