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

建议使用的浏览器:

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

3444:The Volume of Simple Polyhedron

题目描述
Simple Polyhedron is the polyhedron which has a genus of zero(It hasn't to be a convex polyhedron).
Given a convex polyhedron with n planes, there are m points on each plane.
If there is a hole on some plane, then the position of the hole will be given as a point or several points.
Looking from the outside to the inside, the order of the points is clockwise.
If there are holes:
The points on odd layers will be given in counterclockwise, and the points on the even layers will be given in clockwise. The points will be given in the topological order of the layers from the outside to the inside.
Your task is to calculate the volume of the polyhedron.
输入解释
Multiple test cases.
Each case begins with an integer n (4<=n<=20), which is the number of planes.
There will be n blocks following, each block describes a plane.
Every block begins with an integer m, which is the number of the points on the plane.
Each of the following m lines contains 3 integers, which are the coordinate of the point on the plane.

Input ends with n=0.
输出解释
Print the answer of each case in a separate line and the answer should be rounded to four decimal places.
输入样例
7
3
0 0 0
0 2 0
3 0 0
3
1 0 1
2 0 1
1 1 1
3
0 0 0
0 0 3
0 2 0
3
1 0 1
1 1 1
1 0 2
3
3 0 0
0 2 0
0 0 3
3
1 1 1
2 0 1
1 0 2
6
0 0 0
3 0 0
0 0 3
1 0 1
1 0 2
2 0 1
0
输出样例
2.8333
来自杭电HDUOJ的附加信息
Recommend zhouzeyong

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

源链接: HDU-3444

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

共提交 0

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