#P1661. 扩散
扩散
Description
Each point expands by a distance of 1 in the four cardinal directions every unit of time, as shown in the figure.

Two points and are connected, denoted , if and only if the expansion regions of and have a nonempty intersection. A connected component is defined so that for any two points and within the component, there exists a path . Given points on the plane, find the earliest time when they form a single connected component.
Input Format
The first line contains an integer . Each of the next lines contains two integers and , the coordinates of a point.
Output Format
Output a single number, representing the earliest time when all points form a single connected component.
2
0 0
5 5
5
Hint
Constraints
- For of the testdata, , .
- For of the testdata, , .
Translated by ChatGPT 5
京公网安备 11011102002149号