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