report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
Triangle classification - FlandreOJ: Flandre Online Judge

Triangle classification

Time limit: 1000 ms
Memory limit: 256 MB
Given three points $A(x_A,y_A),B(x_B,y_B),C(x_C,y_C)$. 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 $x_A,y_A,x_B,y_B,x_C,y_C$. ### Output - Print: + `RIGHT` if it is a right triangle. + `ACUTE` if it is an acute triangle. + `OBTUSE` if it is an obtuse triangle. ### Constraints - $-10^9 \le x, y \le 10^9$. ### Example Input: ``` 0 0 0 5 -1 7 ``` Output: ``` OBTUSE ```
Geometry
Three points
Line segment intersection
Line intersection
Quadrilateral classification
Point location
Triangle classification
Polygon area
Distance to polygon
Convex hull
Perpendicular pairs
Maximum quadrilateral
Catching butterflies
Topic
Geometry
Rating 1200
Solution (1) Solution