#abc215f. F - Dist Max 2
F - Dist Max 2
Score : points
问题描述
给定二维平面上 个不相同的点。第 个点 的坐标为 。
我们定义两点 和 之间的距离为 :即它们在 坐标上的差值和在 坐标上的差值的较小者。
求出两个不同点之间的最大距离。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
Given are distinct points in a two-dimensional plane. Point has the coordinates .
Let us define the distance between two points and be : the smaller of the difference in the -coordinates and the difference in the -coordinates.
Find the maximum distance between two different points.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the maximum distance between two different points.
Sample Input 1
3
0 3
3 1
4 10
Sample Output 1
4
The distances between Points and , between Points and , and between Points and are , , and , respectively, so your output should be .
Sample Input 2
4
0 1
0 4
0 10
0 6
Sample Output 2
0
Sample Input 3
8
897 729
802 969
765 184
992 887
1 104
521 641
220 909
380 378
Sample Output 3
801
update @ 2024/3/10 09:33:19