编程介的小学生 2019-04-13 17:49 采纳率: 20.5%
浏览 253

一个攻防的算法策略的问题,如何才能利用C语言的编程的特点来写程序解决

Problem Description
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.

Input
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.

Output
For each test case, output one line containing the answer modulo 109+7.

Sample Input
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

Sample Output
4
24

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 YoloV5 第三方库的版本对照问题
    • ¥15 请完成下列相关问题!
    • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
    • ¥15 求daily translation(DT)偏差订正方法的代码
    • ¥15 js调用html页面需要隐藏某个按钮
    • ¥15 ads仿真结果在圆图上是怎么读数的
    • ¥20 Cotex M3的调试和程序执行方式是什么样的?
    • ¥20 java项目连接sqlserver时报ssl相关错误
    • ¥15 一道python难题3
    • ¥15 牛顿斯科特系数表表示