记录编号 |
22376 |
评测结果 |
AAAAAAAAAA |
题目名称 |
扩散 |
最终得分 |
100 |
用户昵称 |
wo shi 刘畅 |
是否通过 |
通过 |
代码语言 |
Pascal |
运行时间 |
0.017 s |
提交时间 |
2010-11-18 19:55:08 |
内存使用 |
0.16 MiB |
显示代码纯文本
var
n,i,j,k,s:longint;
x,y:array[0..1000]of longint;
f:array[0..100,0..100]of longint;
function max(a,b:longint):longint;
begin
if a>b then exit(a);
exit(b);
end;
begin
assign(input,'ppg.in'); reset(input);
assign(output,'ppg.out'); rewrite(output);
readln(n);
for i:=1 to n do read(x[i],y[i]);
for i:=1 to n do
for j:=1 to n do
f[i,j]:=(abs(x[i]-x[j])+abs(y[i]-y[j])+1) div 2;
for k:=1 to n do
for i:=1 to n do
for j:=1 to n do
if max(f[i,k],f[k,j])<f[i,j] then
f[i,j]:=max(f[i,k],f[k,j]);
for i:=1 to n do
for j:=1 to n do
if f[i,j]>s then s:=f[i,j];
writeln(s);
close(input);
close(output);
end.