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

建议使用的浏览器:

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

3227:Heroes Arrangement

题目描述
There are N heroes in the Kingdom of Heroes, each hero has a special range of activity, this “range” is a delta-shaped region (triangle region including the boundary; it is guaranteed that all triangles will neither degenerate into a segment nor a point on the King’s angle of view), and heroes can appear in any point in his activity range. The king, standing at the Origin (0, 0, 0), is observing the heroes. No range of activity will contain the king’s position.

You may assume that no hero could meet others, that means these “range” have no common point. Your task is to find number K, indicating that the king can choose at most K heroes such that no pairs of chosen heroes cause one may block the king’s view line to observe another. In other words, no hero can appear on the segment between another hero and the King.
输入解释
There are multiple test cases, the number of them, T, is given in the very first line of the input, followed by T cases.

For each test case:
First line contains an integer N, the number of heroes, 1≤N≤40. Then N lines follow, each line contains nine integers x1 y1 z1 x2 y2 z2 x3 y3 z3, denoting the coordinates of the delta-shaped regions’ vertex respectively, -100≤x1, y1, z1, x2, y2, z2, x3, y3, z3≤100.
输出解释
Output a single line with a number K with case number, the maximum number of heroes that king can choose.
输入样例
2
2
0 0 1 1 2 1 -1 2 1
0 0 2 1 -2 2 -1 -2 2
2
0 0 1 1 2 1 -1 2 1
0 0 -1 1 -2 -1 -1 -2 -1
输出样例
Case #1: 1
Case #2: 2
提示
The sample image of the sample input is drawn below, the small sphere is the position of the king.
来自杭电HDUOJ的附加信息
Recommend zhuweicong

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

源链接: HDU-3227

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

共提交 0

通过率 --%
时间上限 内存上限
6000/3000MS(Java/Others) 32768/32768K(Java/Others)