ELLIPSE - Ellipse
Given 5 points on a ellipse, calculate the area of the ellipse. We accept solutions with absolute error less than 10-6 or relative error less than 10-9.
Many test cases. Each contains a line with 10 integers with absolute value less than 1000 - the X and Y coordinates of the 5 points, respectively.
Input terminates by EOF. Note that there can be extra spaces in a single line.
Each line contains a single float-point number - the area of the corresponding ellipse, or "IMPOSSIBLE" if the ellipse doesn't exist or can't be unique determined.
Input: 6 1 3 2 -2 -3 -3 -2 1 6 7 -3 2 7 6 3 5 5 -2 -9 Output: IMPOSSIBLE 157.079633
Note: You can click on "Wrong Answer" to get further information.
Note: Judge is slightly modified to avoid some precision problems.
Java start up time will overwhelm the time limit. Should have more time for Java solutions.