#abc348b. B - Farthest Point
B - Farthest Point
Score: points
问题陈述
在 平面上,有 个点,它们的 ID 编号从 到 。点 位于坐标 ,并且没有两个点的坐标是相同的。
从每个点出发,找出最远的点,并打印出它的 ID 编号。如果有多个点是最远的,打印出这些点的 ID 编号中最小的一个。
在这里,我们使用欧几里得距离:对于两个点 和 ,它们之间的距离是 。
以上为大语言模型 kimi 翻译,仅供参考。
Problem Statement
On the -plane, there are points with ID numbers from to . Point is located at coordinates , and no two points have the same coordinates.
From each point, find the farthest point and print its ID number. If multiple points are the farthest, print the smallest of the ID numbers of those points.
Here, we use the Euclidean distance: for two points and , the distance between them is .
Constraints
- if .
- All input values are integers.
Input
The input is given from Standard Input in the following format:
Output
Print lines. The -th line should contain the ID number of the farthest point from point .
Sample Input 1
4
0 0
2 4
5 0
3 4
Sample Output 1
3
3
1
1
The following figure shows the arrangement of the points. Here, represents point . The farthest point from point are points and , and point has the smaller ID number.
The farthest point from point is point .
The farthest point from point are points and , and point has the smaller ID number.
The farthest point from point is point .
Sample Input 2
6
3 2
1 6
4 5
1 3
5 5
9 8
Sample Output 2
6
6
6
6
6
4