当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

5473:There was a kingdom

题目描述
Once upon a time, there was a kingdom ruled by a wise king.
After years of his reign, by means of successful economic actions, the kingdom, with n cities, became an economic power soon.
Without nation defense, the development of the state economy will be hurt, the king said.
After days of serious thoughts, the king finally decided to choose k cities to cover as more area as possible (the area covered by k cities equals to the area of the convex formed by these k points).
However, the king don't know how to choose the optimal way to do it. Please help him!
输入解释
The input consists of multiple test cases.
The first line of the input gives the number of test cases, T ($1 \leq T \leq 200$). T test cases follow.
Each test case starts with two integer n ($1 \leq n \leq 100$) and k ($1 \leq k \leq n$).
Then following n lines contains two integers x and y, the coordinates of the cities.
$-10^7 \leq x \leq 10^7$, $-10^7 \leq y \leq 10^7$.
It is guaranteed that there are no more than 30 test cases in which $n \geq 50$.
输出解释
Please output "Case #k: res", k is the number of test case and res is maximum area multiply 2, to make sure res is always an integer.
输入样例
1
5 3
10 -2
-7 -10
-3 -8
-10 10
-10 5
输出样例
Case #1: 364
来自杭电HDUOJ的附加信息
Recommend hujie

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-5473

最后修改于 2020-10-25T23:22:58+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
4000/2000MS(Java/Others) 65536/65536K(Java/Others)