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

建议使用的浏览器:

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

5572:An Easy Physics Problem

题目描述
On an infinite smooth table, there's a big round fixed cylinder and a little ball whose volume can be ignored.

Currently the ball stands still at point $A$, then we'll give it an initial speed and a direction. If the ball hits the cylinder, it will bounce back with no energy losses.

We're just curious about whether the ball will pass point $B$ after some time.
输入解释
First line contains an integer $T$, which indicates the number of test cases.

Every test case contains three lines.

The first line contains three integers $O_x$, $O_y$ and $r$, indicating the center of cylinder is $(O_x, O_y)$ and its radius is $r$.

The second line contains four integers $A_x$, $A_y$, $V_x$ and $V_y$, indicating the coordinate of $A$ is $(A_x, A_y)$ and the initial direction vector is $(V_x, V_y)$.

The last line contains two integers $B_x$ and $B_y$, indicating the coordinate of point $B$ is $(B_x, B_y)$.

$\cdot$ 1 ≤ $T$ ≤ 100.

$\cdot$ |$O_x$|,|$O_y$|≤ 1000.

$\cdot$ 1 ≤ $r$ ≤ 100.

$\cdot$ |$A_x$|,|$A_y$|,|$B_x$|,|$B_y$|≤ 1000.

$\cdot$ |$V_x$|,|$V_y$|≤ 1000.

$\cdot$ $V_x \neq 0$ or $V_y \neq 0$.

$\cdot$ both A and B are outside of the cylinder and they are not at same position.
输出解释
For every test case, you should output "Case #x: y", where $x$ indicates the case number and counts from $1$. $y$ is "Yes" if the ball will pass point $B$ after some time, otherwise $y$ is "No".
输入样例
2
0 0 1
2 2 0 1
-1 -1
0 0 1
-1 2 1 -1
1 2
输出样例
Case #1: No
Case #2: Yes
来自杭电HDUOJ的附加信息
Recommend wange2014

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

源链接: HDU-5572

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

共提交 0

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