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

建议使用的浏览器:

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

5028:Defense Against Wolves

题目描述
Long long ago, there lived a lot of rabbits in the forest. Unfortunately, there were some wolves in the same forest. The rabbit kingdom was attacked by those wolves sometimes and they planned to defend against the wolves.

For each wolves' attack, the rabbit king would choose some rabbits(at least four rabbits) to make a defense team. We can regard each rabbit as a point in the three dimensional space. In the kingdom, there were no four rabbits stayed on a same plane.

During each attack, the number of wolves which would be killed was exactly equal to the number of rabbits which are ON the 3D convex hull of the defense team.

All defense teams should be different. But two different teams might share some rabbits. If the rabbit king couldn't choose a defense team any more, the rabbit kingdom would be destroyed.

Now the wolves want to calculate the number of wolves which would be killed if they wanted to destroy the rabbit kingdom.
输入解释
The input consists at most 50 test cases.

For each test case, the first line contains a integer n (4 <=n <= 50) denoting the number of rabbits.

The following n lines each contains three integers x, y, z (-1000 <= x, y, z <= 1000) denoting the coordinate of a rabbit. All rabbits' positions are different.
输出解释
For each test case, output one line containing the answer modulo 109+7.
输入样例
4
0 0 0
1 0 0
0 1 0
0 0 1
5
0 0 0
10 0 0
0 10 0
0 0 10
3 3 3
输出样例
4
24

提示
   For the first case, the king could choose only one defense team.

   For the second case, the available defense teams are {1,2,3,4,5}, {1,2,3,4}, {1,3,4,5}, {1,2,3,5}, {2,3,4,5}, {1,2,4,5}, and the number of rabbits which are on the 3d convex hull of those teams are all 4 and the answer is 6 * 4 = 24
来自杭电HDUOJ的附加信息
Recommend hujie

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

源链接: HDU-5028

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

共提交 0

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