QOJ.ac

QOJ

時間限制: 5 s 記憶體限制: 512 MB 總分: 100

#3246. Meow Meow Garden

统计

Miaomiao is a very wealthy cat who owns a large garden in Haidian District.

This large garden is an $N$-gon (a polygon with $N$ sides) formed by old fences as its boundaries.

Since Christmas is coming, Miaomiao wants to decorate the garden with $K$ Christmas trees. At the same time, Miaomiao firmly believes that finding good spots to plant the trees will bring him good luck.

As a good cat, he decided to find the optimal positions as follows:

  • All trees must be on the boundary of the garden.
  • These $K$ trees should divide the perimeter of the garden equally.
  • The area of the new convex $K$-gon formed by the trees should be as small as possible.

Although Miaomiao is richer than you, he is not as smart as you. Therefore, he gave you some money and asked you to help him find the minimum area of the convex $K$-gon.

Input

The first line contains two integers, $N$ and $K$, representing the number of vertices of the original garden boundary and the number of trees, respectively.

Each of the next $N$ lines contains two integers $x_i$ and $y_i$, representing the coordinates of the vertices of the garden boundary.

All coordinates are given in counter-clockwise order.

Output

Output the minimum area of the convex $K$-gon. Your answer is considered correct if the relative or absolute error does not exceed $10^{-8}$.

Examples

Input 1

5 4
0 0
1 0
2 1
2 2
0 2

Output 1

1.9892766953

Input 2

3 3
0 0
0 1
1 0

Output 2

0.1226170434

Subtasks

  • $3 \le N, K \le 1000$
  • $-10^5 \le x_i, y_i \le 10^5$

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.