I originally read the problem statement as stating that the radius could only be up to 1000 in length. Hence, I was really confused when everyone was saying the problem was really easy. But that nightmare is behind me now.
I never figured out how to do it with that kind of restriction of the radius in under 1 second. What would be the optimal algorithm to use for that case?
The statement describes the precision as 10^-9, but in the second example I see "1.41421356237309" This number has 14 digits behind decimal point. I tried submitting answers with precision 9, 14 and 16. They all WA#1 even though my calculations have to be correct. Does someone know what's the correct precision?
I had WA #4 too. I suppose in that test case the coordinates which my program has given as answer were coincided with some from the input. I got AC as changing them adding some fraction. Yes, that change doesn't guarantees you a correct answer, but if the fraction has about 9 digits after the decimal point the probability of coincidence is negligible. The fraction I used is 0.0111.
The answers of the tests aren't unique. For example for the first sample test my AC program outputs 4.564191068 4.136298156 5.377150309. It can be also 0 0 (and the respective radius). But don't forget to check if the coordinates of your answer don't coincide with some from the input.
I calculated points in double. I made all comparings with abs(a-b)<eps; But eps = 10^-9. - AC eps = 10^-8. - AC eps = 10^-7. - AC eps = 10^-6. - AC eps = 10^-5. - AC eps = 10^-4. - AC eps = 10^-3. - AC eps = 10^-2. - AC eps = 10^-1. - AC eps = 10^1. - AC eps = 10^2. - AC eps = 10^3. - AC!!!! eps = 10^4. - WA1. So... I do not know much about contests rules, but it seemes strange for me)