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

建议使用的浏览器:

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

3437:Garden

题目描述
Every giantarum has its garden. So welcome to AekdyCoin’s garden! Here is the spray pond!

The small blue point in the figure above is the headwater. The stream path is red. And there are some kind of dam-board, any of them has magic power! When the water meets with the dam-board, something will happen!
Consider the headwater as one point in three-dimensional space and its coordinate is (0, 0, H). Then a velocity is given as the water’s horizontal velocity. You could see in the figure following:



So if there is no dam-board cut off the stream path, the stream path will just as the yellow path in the figure above!( Air drag, friction will be ignore!)



But if there exist some dam-board cut off the stream path

So, if the dam-board cut off the stream, the Vertical velocity of the stream will become 0! And then depend on the magic power of the dam-board, the New_Vx ,New_Vy of New_V will change!

There are three kind of dam-board in AekdyCoin’s Garden.

(1)  Type 0: the horizontal velocity vector rotate anticlockwise for some radian:



(2)  Type 1: The Vx will be modified!



If the Vx is modified, we could know the horizontal velocity will be modified too!

(3)  Type 2: The Vy will be modified!



If the Vy is modified, we could know the horizontal velocity will be modified too!

Note: The modification happened at the moment when the stream touches the dam-board

Now AekdyCoin focus on a water-drop at the headwater and its mass is exactly M (kg).
Now Stupid AekdyCoin want you to write a program to tell him the time this water-drop need to drop onto the plane (z = 0). (In this problem, the acceleration due to gravity G is 9.18)

输入解释
In the first line there is an integer T, indicates the number of test cases. (T <= 10)
In each case, the first line contains three real numbers Vx,Vy and H, indicates the horizontal velocity and the headwater’s three dimensional coordinate is (0,0,H).
(-1000 <= Vx,Vy <= 1000, |H| <= 1000)
Then a single line contains only one integer N, indicates the number of dam-board(0 <= N <= 10)
Then following N lines:
In each line, the first real number h is the height of the dam-board(|h| <= 1000), and then an integer Ni indicates the coordinate of the Ni vertex of the dam-board(3<=Ni<=10). Then Ni coordinate (xi,yi) (-1000<=xi,yi<=1000,xi,yi are both integers)(Dam-board is always on a horizontal plane, so (xi,yi) indicates the three dimensional coordinate of the vertex is (xi,yi,h),and it is convex polygon.All the points will be given in clockwise or anticlockwise order!No two board share the same height!). Then one integer typ indicate the type of the dam-board, at last one real number k:
(1)  If the typ = 0, then the k indicate the radian(|k| <= 2.0 * PI,PI = 3.1415…)
(2)  If typ = 1 or typ = 2 then we should change Vx or Vy into k! (|k| <= 1000)


输出解释
Output “Case d: “first where d is the case number counted from one. Then output the time the water-drop need to drop onto the plane (z = 0), then output the answer rounded to 2 digits after the decimal point.
Otherwise if the water-drop could not drop onto the plane (z = 0) forever, just output “Forever!”.

输入样例
2

1 0 -5
0

1 0 18.36
1 
9.18 4 0 0 100 0 100 100 0 100 0 3.1415927
输出样例
Case 1: Forever!
Case 2: 4.24


[hint]

In case 1:

In case 2:
来自杭电HDUOJ的附加信息
Author AekdyCoin
Recommend zhouzeyong

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

源链接: HDU-3437

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

共提交 0

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