比赛 |
20101118 |
评测结果 |
WWWWWWWWWW |
题目名称 |
扩散 |
最终得分 |
0 |
用户昵称 |
Des. |
运行时间 |
0.000 s |
代码语言 |
Pascal |
内存使用 |
0.00 MiB |
提交时间 |
2010-11-18 10:39:52 |
显示代码纯文本
program ppg;
var x,y:array[0..100]of longint;
f:array[0..100,0..100]of longint;
t,k,m,n,i,j,max:longint;
function min(a,b:longint):longint;
begin
if a>b then min:=b else min:=a;
end;
begin
assign(input,'ppg.in');
reset(input);
assign(output,'ppg.out');
rewrite(output);
readln(n);
for t:=1 to n do
readln(x[t],y[t]);
for t:=1 to n-1 do
for k:=t+1 to n do
begin
f[t,k]:=(abs(x[t]-x[k])+abs(y[t]-y[k])+1)div 2;
f[k,t]:=f[t,k];
end;
for i:=1 to n do
for t:=1 to n do
for k:=1 to n do
if (t<>i)and(t<>k)and(i<>k)and(f[t,i]+f[i,k]<f[t,k]) then
f[t,k]:=f[t,i]+f[i,k];
for t:=1 to n do
for k:=1 to n do
if t<>k then
if max<f[t,k] then
max:=f[t,k];
writeln(max);
close(output);
end.