- Dejected Birthday-允诺
- 2009-01-17 15:35:12 @
var
n,jj:longint;
s,ss:string;
aa:array[0..1000,0..1000] of longint;
procedure init;
var
i,u,v,k:longint;
begin
readln(s);
val(copy(s,1,2),jj);
jj:=jj*60;
val(copy(s,4,2),u);
jj:=jj+u;
readln(n,k);
filldword(aa,sizeof(aa) div 4,200000000);
for i:=1 to k do
begin
readln(u,v,aa);
aa[v,u]:=aa;
end;
readln(ss);
end;
procedure prim;
var
pi,min,i,j,k:longint;
cost:array[1..1000] of longint;
begin
pi:=1;
filldword(cost,sizeof(cost) div 4,100000000);
cost[1]:=0;
for i:=1 to n-1 do
begin
min:=maxlongint;
for j:=1 to n do
if aa[pi,j]+cost[pi]
0 条评论
目前还没有评论...