233. The Greatest Angle
time limit per test: 0.25
memory limit per test: 4096
Consider two points A and B located strictly inside of some circle in Cartesian coordinate system. You task is to find a point C on the circle such that the angle ACB is maximal possible.
On first line of input file there is one integer N - number of tests (1<=N<=10000). I+1-th line describes I-th test case in format X0, Y0, R, XA, YA, XB, YB, where (X0, Y0) is center of the circle, R is radius of the circle, (XA, YA) are point A coordinates, (XB, YB) are point B coordinates. All numbers are integers.
X0, Y0, R are not greater than 10000 by absolute value.
Output file must contain N lines, exactly one for each test case. For each case you must output XC and YC - coordinates of point C, described in statement, with precision of six digits after decimal point. If there are many solutions, output any one of them.
0 0 2 1 1 -1 1
0 0 2 0 1 1 0
|Server time: 2017-09-26 22:18:27||Online Contester Team © 2002 - 2016. All rights reserved.|