22 人解决,49 人已尝试。
26 份提交通过,共有 132 份提交。
6.2 EMB 奖励。
单点时限: 2.0 sec
内存限制: 256 MB
Your task is to calculate the intersection of given two lines.
Input will consist of $N$ $(0< N< 40)$ test cases. Each test case consists of eight integers. These integers represent the coordinates of four points on the plane in the order $x_1,y_1,x_2,y_2,x_3,y_3,x_4,y_4$. Thus each of these input lines represents two lines on the plane: the line through $(x_1,y_1)$ and $(x_2,y_2)$ and the line through $(x_3,y_3)$ and $(x_4,y_4)$. The point $(x_1,y_1)$ is always distinct from $(x_2,y_2)$. Likewise with $(x_3,y_3)$ and $(x_4,y_4)$. Input terminated by EOF
.
All inputs have absolute values less than $10~000$.
You can assume that all inputs are valid and can calculate the multiplication.
Your program should output the $x$ and $y$ coordinates of the intersecting point, correct to two dicimal places like shown below if exists only one intersection, othewise print NONE
. Do not output extra spaces or new lines.
5 0 0 4 4 0 4 4 0 5 0 7 6 1 0 2 3 5 0 7 6 3 -6 4 -3 2 0 2 27 1 5 18 5 0 3 4 0 1 2 2 5
2.00 2.00 NONE NONE 2.00 5.00 1.07 2.20
22 人解决,49 人已尝试。
26 份提交通过,共有 132 份提交。
6.2 EMB 奖励。