#P9702. [GDCPC 2023] Computational Geometry
[GDCPC 2023] Computational Geometry
题目描述
Given a convex polygon with vertices, you need to choose two vertices of , so that the line connecting the two vertices will split into two smaller polygons and , both with positive area.
Let be the diameter of polygon and be the diameter of polygon , calculate the minimum value of .
Recall that the diameter of a polygon is the maximum distance between two points inside or on the border of the polygon.
输入格式
There are multiple test cases. The first line of the input contains an integer indicating the number of test cases. For each test case:
The first line contains an integer () indicating the number of vertices of the convex polygon .
For the following lines, the -th line contains two integers and () indicating the -th vertex of the convex polygon . Vertices are given in counter-clockwise order. It's guaranteed that the area of the convex polygon is positive, and there are no two vertices with the same coordinate. It's possible that three vertices lie on the same line.
It's guaranteed that the sum of of all test cases will not exceed .
输出格式
For each test case output one line containing one integer indicating the answer.
2
4
1 0
2 0
1 1
0 0
6
10 4
9 7
5 7
4 5
6 4
9 3
4
44
提示
The first sample test case is shown as follows. The diameter of smaller polygons are marked by red dashed segments. In fact, and are the only pair of vertices we can choose in this test case. You can't choose and , or and , because they can't split into two smaller polygons both with positive area.

The second sample test case is shown as follows. The diameter of smaller polygons are marked by red dashed segments.
