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

建议使用的浏览器:

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

1586:Three Sides Make a Triangle

题目描述
You work for an art store that has decided to carry every style and size of drafting triangle in existence. Unfortunately, sorting these has become a problem. The manager has given you the task of organizing them. You have decided to classify them by edge length and angles. To measure each triangle, you set it on a large sheet of very accurate graph paper and record the coordinate of each point. You then run these three points through a computer program to classify the triangles according to:
Scalene no equal sides
Isosceles two equal sides
Equilateral three equal sides
and
Acute all angles under 90
Right one angle equal 90
Obtuse one angle over 90
Of course, sometimes you make mistakes entering the data, so if you input points that do not form a valid triangle, your program should tell you.
输入解释
One triangle is described per line. Each line has six measurements taken to the nearest 0.001 in the order:
x1 y1 x2 y2 x3 y3
The final line of input will contain only a -1.
None of the test sets contain non-right angles in the range 88-92 degrees, nor do any of the test sets include any non-equal side lengths for one triangle within 0.01 of one another.
输出解释
You will output one line for each triangle, which will contain two words:
< length classification > < angle classification >
or
Not a Triangle
The final line of your output file will be:
End of Output
输入样例
10.000 10.000 10.000 20.000 20.000 10.000
0.000 0.000 4.000 0.000 2.000 3.464
-1
输出样例
Isosceles Right
Equilateral Acute
End of Output

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

题目来源 Mid-Atlantic 2003

源链接: POJ-1586

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

共提交 0

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