记录编号 |
22259 |
评测结果 |
AAAAAAAAAA |
题目名称 |
扩散 |
最终得分 |
100 |
用户昵称 |
donny |
是否通过 |
通过 |
代码语言 |
Pascal |
运行时间 |
0.017 s |
提交时间 |
2010-11-18 12:03:30 |
内存使用 |
0.12 MiB |
显示代码纯文本
- 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.