QOJ.ac

QOJ

Time Limit: 5 s Memory Limit: 512 MB Total points: 100

#3246. 喵喵花園

الإحصائيات

题目背景

题目描述

喵喵是一只非常富有的猫咪,他在海淀区拥有一个大花园。

这个大花园是由一些旧栅栏为边界所形成的 $N$-gon(即具有 $N$ 边的多边形)。

由于圣诞节快到了,喵喵想用$K$棵圣诞树来装饰一下花园。 同时,喵喵坚信找到一些好的位置来种树会给他带来好运。

作为一只好猫咪,他决定寻找最佳位置如下:

  • 所有的树都应该在花园的边界上。
  • 这些 $K$ 树应该平均划分花园的周长。
  • 由树木形成的新凸面$K$-gon 的面积应尽可能小。

虽然喵喵比你有钱,但他没有你那么聪明。 因此,他给了你一些钱,让你帮他找出凸$K$-gon 的最小面积。

输入格式

第一行包含两个整数,$N$ 和 $K$,代表原本花园边界的顶点数和树的数量。

接下来的每行 $N$ 行包含两个整数 $x_i$ 和 $y_i$,表示花园边界顶点的坐标。

所有座标均为逆时针给出的。

输出格式

输出凸面$K$-gon 的最小面积。 如果相对或绝对误差不超过 $10^{-8}$,则您的答案被认为是正确的。

样例1输入

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

样例1输出

1.9892766953

样例2输入

3 3
0 0
0 1
1 0

样例2输出

0.1226170434

子任务

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

We understand that our problem archive is not perfect. If you find any issues with the problem, including the statement, scoring configuration, time/memory limits, test cases, etc.

You may use this form to submit an issue regarding the problem. A problem moderator will review your issue and proceed it properly.

STOP! Before you submit an issue, please READ the following guidelines:

  1. This is not a place to publish a discussion, editorial, or requests to debug your code. Your issue will only be visible by you and problem moderators. Other users will not be able to view or reply your issues.
  2. Do not submit duplicated issues. If you have already submitted one, please wait for an moderator to review it. Submitting multiple issues will not speed up the review process and might cause your account to be banned.
  3. Issues must be filed in English or Chinese only.
  4. Be sure your issue is related to this problem. If you need to submit an issue regarding another problem, contest, category, etc., you should submit it to the corresponding page.

Active Issues 0

No issues in this category.

Closed/Resolved Issues 0

No issues in this category.