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