比赛 |
20110722 |
评测结果 |
AWAWEWWEEEEEEEEEE |
题目名称 |
网络探测 |
最终得分 |
11 |
用户昵称 |
echo |
运行时间 |
0.000 s |
代码语言 |
Pascal |
内存使用 |
0.00 MiB |
提交时间 |
2011-07-22 11:56:01 |
显示代码纯文本
program ping;
var
n,m,t,i,j,k,e,ans:longint;
g:array[0..100,0..100] of longint;
begin
assign(input,'ping.in');
assign(output,'ping.out');
reset(input);
rewrite(output);
readln(n,m,t);
for i:=0 to n-1 do
for j:=0 to n-1 do
if i<>j then g[i,j]:=1000000000
else g[i,j]:=0;
for k:=1 to m do
begin
readln(i,j,e);
g[i,j]:=e;
end;
for k:=0 to n-1 do
for i:=0 to n-1 do
for j:=0 to n-1 do
if g[i,j]>g[i,k]+g[k,j]
then g[i,j]:=g[i,k]+g[k,j];
writeln(g[0,t]);
close(input);
close(output);
end.