Processing math: 100%
Triangle classification - MarisaOJ: Marisa Online Judge

Triangle classification

Time limit: 1000 ms
Memory limit: 256 MB
Given three points A(xA,yA),B(xB,yB),C(xC,yC). Determine if the type of the triangle formed by these points (right, acute, obtuse). It is guaranteed that A,B,C are not collinear. ### Input - A single line contains six integers xA,yA,xB,yB,xC,yC. ### Output - Print: + RIGHT if it is a right triangle. + ACUTE if it is an acute triangle. + OBTUSE if it is an obtuse triangle. ### Constraints - −109≤x,y≤109. ### Example Input: 0005-17 Output: OBTUSE