time limit per test: 0.25 sec. memory limit per test: 4096 KB
input: standard output: standard
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.
2 0 0 2 1 1 -1 1 0 0 2 0 1 1 0
0.000000 2.000000 1.414214 1.414214
Codeforces (c) Copyright 2010-2019 Mike Mirzayanov