304471: CF852H. Bob and stages

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Bob and stages

题意翻译

给出平面上 $n$ 个点,要求选出 $k$ 个点,使得这些点形成一个凸包,且凸包内部没有点,求最大面积。

题目描述

The citizens of BubbleLand are celebrating their 10th anniversary so they decided to organize a big music festival. Bob got a task to invite $ N $ famous singers who would sing on the fest. He was too busy placing stages for their performances that he totally forgot to write the invitation e-mails on time, and unfortunately he only found $ K $ available singers. Now there are more stages than singers, leaving some of the stages empty. Bob would not like if citizens of BubbleLand noticed empty stages and found out that he was irresponsible. Because of that he decided to choose exactly $ K $ stages that form a convex set, make large posters as edges of that convex set and hold festival inside. While those large posters will make it impossible for citizens to see empty stages outside Bob still needs to make sure they don't see any of the empty stages inside that area. Since lots of people are coming, he would like that the festival area is as large as possible. Help him calculate the maximum area that he could obtain respecting the conditions. If there is no such area, the festival cannot be organized and the answer is 0.00.

输入输出格式

输入格式


The first line of input contains two integers $ N\ (3<=N<=200) $ and $ K\ (3<=K<=min(N,50)) $ , separated with one empty space, representing number of stages and number of singers, respectively. Each of the next $ N $ lines contains two integers $ X_{i} $ and $ Y_{i} $ $ (0<=X_{i},Y_{i}<=10^{6}) $ representing the coordinates of the stages. There are no three or more collinear stages.

输出格式


Output contains only one line with one number, rounded to exactly two decimal places: the maximal festival area. Rounding is performed so that $ 0.5 $ and more rounds up and everything else rounds down.

输入输出样例

输入样例 #1

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

输出样例 #1

10.00

说明

Example explanation: From all possible convex polygon with $ 4 $ vertices and no other vertex inside, the largest is one with points $ (0,0) $ , $ (2,1) $ , $ (4,4) $ and $ (1,5) $ .

Input

题意翻译

给出平面上 $n$ 个点,要求选出 $k$ 个点,使得这些点形成一个凸包,且凸包内部没有点,求最大面积。

加入题单

算法标签: