我的程序是这样
program ty;
var
a:array[1..1000000,1..1000000] of integer;
c,b:array[0..1000000] of longint;
i,j,n,m,y:longint;
t,g,x:int64;
begin
read(n,m,t);
for i:=1 to n do
for j:=1 to n do a[i,j]:=-1;
for i:=1 to m do
begin
read(x,y);
read(a[x,y]);
a[y,x]:=a[x,y];
end;
for i:=2 to n do b[i]:=a[1,i];
for i:=1 to n-1 do c[i]:=i+1;
c[0]:=n-1;
for i:=2 to n do
begin
x:=100000000;
for j:=1 to c[0] do if (b[c[j]]<x) and (b[c[j]]>0) then begin x:=b[c[j]]; y:=j; end;
for j:=1 to c[0] do if (b[c[j]]>a[c[y],c[j]]+b[c[y]]) and (a[c[y],c[j]]>0) and (b[y]>0) then b[c[j]]:=a[c[y],c[j]]+b[c[y]];
for j:=y to c[0] do c[j]:=c[j+1];
c[0]:=c[0]-1;
end;
for i:=2 to n do g:=g+(b[i]*2);
writeln(g);
if g>t then write(’escape’)
else write(’run’);
end.
a:array[1..1000000,1..1000000] of integer;
c,b:array[0..1000000] of longint;
你数组开这么大,当然出错!!!!!!!!!!!!!!!!!!