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

建议使用的浏览器:

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

6535:Chika and Solid Geometry

Special Judge 特殊评判
题目描述
Chika has just learned about solid geometry! She is very interested in the volume of three-dimensional geometric shapes, so she decides to test you.
Before that, she is going to tell you definitions of the following two three-dimensional geometric shapes.

Oblique circular cone: A cone whose surface is generated by lines joining a fixed point called the apex to the points of a circle, the fixed point lying on a line that is not perpendicular to the circle at its center. (The circular cone is a special kind of oblique circular cone.)



Pyramid: A polyhedron formed by connecting a polygonal base and a point, called the apex. Each base edge and apex form a triangle, called a lateral face. It is a conic solid with polygonal base. A pyramid with an n-sided base has $n + 1$ vertices, $n + 1$ faces, and $2n$ edges.



Chika gives you an oblique circular cone and a pyramid placed in the space rectangular coordinate system. Their bottoms are on the plane $z=0$. The $z$-coordinates of their apexes are bigger than $0$. Some parts of them may overlap with each other. You need to help Chika to calculate the volume of the union of the two three-dimensional geometric shapes.
输入解释
The input file contains several lines.
The first line contains three integers $x$, $y$, $z$ $(z > 0)$, which are the coordinates of the apex of the oblique circular cone.
The second row contains three integers $x$, $y$ and $r$ $(r > 0)$. $x$ and $y$ are the $x$-coordinate and the $y$-coordinate of the center of the oblique circular cone's bottom circle. $r$ is radius of the oblique circular cones's bottom circle.
The third line contains three integers $x$, $y$, $z$ $(z > 0)$, which are the coordinates of the apex of the pyramid.
The fourth line contains a positive integer $n$ $(n \leq 1000)$, which is the number of vertices of the pyramid's bottom polygon.
Then $n$ lines follow. Each line contains two integers $x$, $y$, which are the $x$-coordinate and $y$-coordinate of the $n$ vertices of the pyramid's bottom polygon. Vertex coordinates are given in counterclockwise order. These points do not coincide.
It is guaranteed that the absolute values of all input integers are not greater than $1000$.
输出解释
The output file should contain only one line, including one real number, representing the volume of the union of the oblique circular cone and the pyramid. The relative error or absolute error between your answer and the standard answer should be less than $10^{-6}$.
输入样例
0 0 2
2 0 2
0 0 2
3
2 0
4 -2
4 2
输出样例
8.9498519738
来自杭电HDUOJ的附加信息
Recommend liuyiding

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

源链接: HDU-6535

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

共提交 0

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