当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

2098:Ellipse

Special Judge 特殊评判
题目描述
Alex has got a tedious homework from his geometry teacher as a punishment for his conduct at geometry lessons --- Alex didn't do anything while the rest of his class was computing areas of different geometric figures!
Now, Alex has to compute the areas of several ellipses drawn on a sheet of paper torn from a textbook. This paper has a rectangular grid drawn on it which can be used to determine the coordinates of different points. However, the task of finding the area of an ellipse can be quite complicated even in this case, especially if the axes of the ellipse are not vertical or horizontal.
Of course, Alex is very lazy, so he wants you to write a program that would determine the area of an ellipse from the coordinates of five different points lying on it. He would then enter the coordinates of these points for each ellipse himself and thus compute the areas of all ellipses.
输入解释
The first line of the input contains the number of ellipses k (1 <= k <= 1 000). Each of the next k lines contains the coordinates of five points that lie on corresponding ellipse. All coordinates are integer and do not exceed 1 000 by their absolute values.
输出解释
On each of k lines of the output write either "IMPOSSIBLE" if the area cannot be determined (e.g. there is no ellipse passing through five given points, or there is more than one such ellipse) or the area itself precise to six digits after decimal point. Note that whenever such an ellipse exists, it always fits completely into the textbook page, i.e. all points (x, y) of the ellipse satisfy inequalities |x|, |y| <= 1 000.
输入样例
3
5 0 0 5 4 3 3 4 -4 -3
6 1 3 2 -2 -3 -3 -2 1 6
7 -3 2 7 6 3 5 5 -2 -9
输出样例
78.539816
IMPOSSIBLE
157.079633
来自北京大学POJ的附加信息
Case time limit(单组数据时间限制) 2000MS

该题目是Virtual Judge题目,来自 北京大学POJ

源链接: POJ-2098

最后修改于 2020-10-29T06:23:22+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
10000 64000