#P8212. [THUPC 2022 初赛] 喵喵花園
[THUPC 2022 初赛] 喵喵花園
Problem Description
Meow Meow is a very rich cat. He owns a large garden in Haidian District.
This garden is an -gon (a polygon with sides) formed by some old fences as its boundary.
Since Christmas is coming soon, Meow Meow wants to decorate the garden with Christmas trees. At the same time, he firmly believes that finding some good places to plant trees will bring him good luck.
As a good cat, he decides to find the best positions as follows:
- All trees should be on the boundary of the garden.
- The trees should evenly divide the perimeter of the garden.
- The area of the new convex -gon formed by the trees should be as small as possible.
Although Meow Meow is richer than you, he is not as smart as you. Therefore, he gives you some money and asks you to help him find the minimum area of the convex -gon.
Input Format
The first line contains two integers, and , representing the number of vertices of the original garden boundary and the number of trees.
Each of the next lines contains two integers and , describing the coordinates of a vertex of the garden boundary.
All coordinates are given in counterclockwise order.
Output Format
Output the minimum area of the convex -gon. Your answer will be considered correct if the relative or absolute error does not exceed .
5 4
0 0
1 0
2 1
2 2
0 2
1.9892766953
3 3
0 0
1 0
0 1
0.1226170434
Hint
Constraints
- .
- .
Translated by ChatGPT 5