Angle Type By Dot Product

Angle Type By Dot Product

Medium Computer Mathematics Linear Algebra Basics 29 views
Explanation Complexity

Problem Statement

Given two 2D vectors, print ACUTE/RIGHT/OBTUSE.

Input Format

ax ay bx by.

Output Format

One word.

Example

1 0 0 1
RIGHT

Constraints

Values fit 64-bit

Input / Output Format

Input Format
ax ay bx by.
Output Format
One word.
Constraints
Values fit 64-bit

Examples

Input:
1 0 0 1
Output:
RIGHT

Example Solution (Public)

Computer Mathematics
Compute dot=ax*bx+ay*by. If dot==0 RIGHT, if >0 ACUTE else OBTUSE.

Official Solution Code

Compute dot=ax*bx+ay*by. If dot==0 RIGHT, if >0 ACUTE else OBTUSE.
Please login to submit solutions.
Editor
Output

                                        
Please login to submit solutions.