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

建议使用的浏览器:

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

7153:Keychains

题目描述
Kayzin is a magician. During a performance one day, he took out two keychains and covered them with a cup. He claimed that when the cup were lifted, the two keychains would be interlocked. But because of the poor lighting, the audience can't see clearly, so the audience wants you to figure out whether the two keychains are interlocked. If yes, please print "Yes", otherwise print "No".

A keychain can be described as a circle in 3-dimensional space.

Two keychains are interlocked, if and only if we can't let their center's distance greater than $10^{114514}$ by moving two keychains without collision.

For the first sample, two keychains are as follows, they are interlocked obviously.


输入解释
First line is one integer $T$, indicating $T$ test cases. In each case:

First line is 7 integers $x_1,y_1,z_1,x_2,y_2,z_2, r$, $(x_1,y_1,z_1)$ indicates the coordinate of the center of the first circle, $(x_2,y_2,z_2)$ indicates the normal vector of the plane of the first circle, $r$ indicates the radius of the first circle.

Second line is 7 integers $x'_1,y'_1,z'_1,x'_2,y'_2,z'_2, r'$, $(x'_1,y'_1,z'_1)$ indicates the coordinate of the center of the second circle, $(x'_2,y'_2,z'_2)$ indicates the normal vector of the plane of the second circle, $r'$ indicates the radius of the second circle.

It is guaranteed that the distance between any two points on two circles is not less than 0.1.

$1\le T \le 1000,$ $-1000\le x_1,y_1,z_1,x_2,y_2,z_2,x'_1,y'_1,z'_1,x'_2,y'_2,z'_2\le 1000,$ $1\le r,r' \le 1000$
输出解释
For each test case, print one line, "Yes" or "No", indicating answer.
输入样例
2
0 0 0 1 0 0 1
0 1 0 0 0 1 1
0 0 0 1 0 0 1
0 1 0 0 0 1 10
输出样例
Yes
No

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

源链接: HDU-7153

最后修改于 2022-09-15T06:17:03+00:00 由爬虫自动更新

共提交 0

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