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

建议使用的浏览器:

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

2693:3D Camera

题目描述
Long long ago, there was a world of triangles. A smart guy in that world invented a camera, whose viewfinder was a
triangle. The camera's visual range could be represented by three RAYS. As the figure shows, the camera's visual
range could be represented by three rays OA, OB, OC. Note that the visual range is INFINITE.


Now, we have a camera with known visual range and a triangle DEF in the space. The inventor wants to know if the
camera can see the triangle, in other words, if there is at least one point of the triangle strict in the visual range.
输入解释
The input consists of multiple test cases. The first line of input contains an integer T, which is the number of test cases.

The first line of each test case contains 12 integers: Ox, Oy, Oz, Ax, Ay, Az, Bx, By, Bz, Cx, Cy, Cz. The second line
contains 9 integers: Dx, Dy, Dz, Ex, Ey, Ez, Fx, Fy, Fz.
All the integers in a line are separated by a whitespace.

[Technical Specification]
T is an integer, and T <= 1000.
The input guaranteed that if you look from O, three points ABC are always arranged counterclockwise.
All integers EXCEPT T is in the range of [-100,100].
We guarantee the camera and the triangle are not degenerate.
输出解释
For each test case, display a single line contains the result, "YES" for visible, "NO" for not visible.
输入样例
2 
90 -14 -17 71 98 94 69 59 -16 -52 68 13  
-69 -96 43 81 -67 -79 66 -51 -53 
0 0 1 0 0 0 1 0 0 0 1 0 
0 0 -5 0 0 -6 1 1 -6 
输出样例
NO 
YES
来自杭电HDUOJ的附加信息
Recommend yifenfei

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

源链接: HDU-2693

最后修改于 2020-10-25T22:55:59+00:00 由爬虫自动更新

共提交 0

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