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

建议使用的浏览器:

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

2165:Gunman

Special Judge 特殊评判
题目描述
Consider a 3D scene with OXYZ coordinate system. Axis OX points to the right, axis OY points up, and axis OZ points away from you. There is a number of rectangular windows on the scene. The plane of each window is parallel to OXY , its sides are parallel to OX and OY . All windows are situated at different depths on the scene (different coordinates z > 0).

A gunman with a rifle moves along OX axis (y = 0 and z = 0). He can shoot a bullet in a straight line. His goal is to shoot a single bullet through all the windows. Just touching a window edge is enough.
Your task is to determine how to make such shot.
输入解释
The first line of the input file contains a single integer number n (2 <= n <= 100) — the number of windows on the scene. The following n lines describe the windows. Each line contains five integer numbers x1i, y1i, x2i, y2i, zi (0 < x1i, y1i, x2i, y2i, zi < 1000). Here (x1i, y1i, zi) are coordinates of the bottom left corner of the window, and (x2i, y2i, zi) are coordinates of the top right corner of the window (x1i < x2i, y1i < y2i). Windows are ordered by z coordinate (zi > zi-1 for 2 <= i <= n).
输出解释
Output a single word "UNSOLVABLE" if the gunman cannot reach the goal of shooting a bullet through all the windows.
Otherwise, on the first line output a word "SOLUTION". On the next line output x coordinate of the point from which the gunman must fire a bullet. On the following n lines output x, y, z coordinates of the points where the bullet goes through the consecutive windows. All coordinates in the output file must be printed with six digits after decimal point.
输入样例
3
1 3 5 5 3
1 2 5 7 5
5 2 7 6 6
输出样例
SOLUTION
-1.000000
2.000000 3.000000 3.000000
4.000000 5.000000 5.000000
5.000000 6.000000 6.000000

该题目是Virtual Judge题目,来自 北京大学POJ

源链接: POJ-2165

最后修改于 2020-10-29T06:25:16+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
1000 65536