#Q16. 「一本通 1.2 练习 2」扩散
「一本通 1.2 练习 2」扩散
Description
A point spreads one unit distance in four directions every unit of time, as shown in the figure: two points and are considered connected, denoted as , if and only if their spreading regions have a common area. The definition of a connected block is that for any two points and within the block, there must exist a path .
Given points on a plane, determine the earliest time at which they form a connected block.
Input Format
The first line contains an integer , followed by lines, each containing the coordinates of a point.
Output Format
Output a single integer representing the earliest time at which all points form a connected block.
Sample 1
2
0 0
5 5
5
Data Range and Hints
For of the data, it is guaranteed that ;
For of the data, it is guaranteed that .