1 / 4
文档名称:

Simple Geometry 算法竞赛入门经典 刘汝佳.doc

格式:doc   页数:4页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

Simple Geometry 算法竞赛入门经典 刘汝佳.doc

上传人:fy3986758 2015/5/14 文件大小:0 KB

下载得到文件列表

Simple Geometry 算法竞赛入门经典 刘汝佳.doc

文档介绍

文档介绍:10250 - The Other Two Trees
You have a quadrilateral shaped land whose opposite fences are of equal length. You have four neighbors whose lands are exactly adjacent to your four fences, that means you have mon fence with all of them. For example if you have a fence of length d in one side, this fence of length d is also the fence of the adjacent neighbor on that side. The adjacent neighbors have no fence mon among themselves and their lands also don’t intersect. The main difference between their land and your land is that their lands are all square shaped. All your neighbors have a tree at the center of their lands. Given the Cartesian coordinates of trees of two opposite neighbors, you will have to find the Cartesian coordinates of the other two trees.
Input
The input file contains several lines of input. Each line contains four floating point or integer numbers x1, y1, x2, y2, where (x1, y1), (x2, y2) are the coordinates of the trees of two opposite neighbors. Input is terminated by end of file.
Output
For each line of input produce one line of output which contains the line “Impossible.” without the quotes, if you cannot determine the coordinates of the other two trees. Otherwise, print four floating point numbers separated by a single space with ten digits after the decimal point ax1, ay1, ax2, ay2, where (ax1, ay1) and (ax2, ay2) are the coordinates of the other two t