#P9568. [SDCPC 2023] Computational Geometry
[SDCPC 2023] Computational Geometry
题目描述
Given a convex polygon with vertices, you need to choose three vertices of , denoted as , and in counter-clockwise order. There must be exactly edges from to in counter-clockwise order (that is to say, is not an endpoint of these edges).
Consider cutting through with segment and . Let be the polygon consisting of , and the edges between and . It's easy to see that this polygon has edges.
Find the maximum possible area of .
Note that and can overlap with edges of .
输入格式
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 two integers and (, ) indicating the number of vertices of the convex polygon and the number of edges from to in counter-clockwise order.
For the following lines, the -th line contains two integers and () indicating the and coordinate of 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 real number indicating the maximum possible area of . Your answer will be considered correct if its relative or absolute error is less than .
3
3 1
0 0
1 0
0 1
8 3
1 2
3 1
5 1
7 3
8 6
5 8
3 7
1 5
7 2
3 6
1 1
3 1
7 1
8 1
5 6
4 6
0.500000000000
26.500000000000
20.000000000000
提示
For the first sample test case, is the whole triangle. Its area is .
The second and third sample test case are shown below.


