#P5717. 【深基3.习8】三角形分类

【深基3.习8】三角形分类

Problem Description

Given the lengths of three line segments aa, bb, and cc, all positive integers not greater than 1000010000. We want to form a triangle using these three segments. What kind of triangle can it be?

  • If the three segments cannot form a triangle, output Not triangle.
  • If it is a right triangle, output Right triangle.
  • If it is an acute triangle, output Acute triangle.
  • If it is an obtuse triangle, output Obtuse triangle.
  • If it is an isosceles triangle, output Isosceles triangle.
  • If it is an equilateral triangle, output Equilateral triangle.

If the triangle satisfies multiple conditions above, output them in the order given above, each on a separate line.

Input Format

Input 3 integers aa, bb, and cc.

Output Format

Output several lines of decision strings.

3 3 3
Acute triangle
Isosceles triangle
Equilateral triangle
3 4 5

Right triangle
6 10 6

Obtuse triangle
Isosceles triangle
1 14 5

Not triangle

Hint

When the sum of the squares of the two shorter sides is greater than the square of the longest side, it is an acute triangle.

When the sum of the squares of the two shorter sides is equal to the square of the longest side, it is a right triangle.

When the sum of the squares of the two shorter sides is less than the square of the longest side, it is an obtuse triangle.

Translated by ChatGPT 5