Triangle Formation
Practice
4.1 (11 votes)
Very Easy
Problem
71% Success 2476 Attempts 10 Points 1s Time Limit 256MB Memory 1024 KB Max Code
You are given a triplet of 3 integers a , b , c and a number x. Now you need to check if it is possible to make a right angled triangle by adding the value x to any two of the numbers in the given triplet. You have to print YES if it is possible or else print NO.
**It is necessary to add the number x**.
Input
First line contains a number t as input denoting total number of test cases. Each test case contains four space separated integers \(a , b , c , x\) .
Output
In the output you have to print YES or NO according to the condition discussed above.
Constraints
\(1 \le t \le 10^4\)
\(-10^{18} \le a , b ,c , x \le 10^{18} \)
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:10
32 votes
Tags:
Basic ProgrammingBasic MathBasics of ImplementationImplementationMath BasicArithmetic operationsMath
Points:10
1 votes
Tags:
Very-Easy
3.ZeroHero
Points:10
3 votes
Tags:
Very-Easy
Editorial
Login to unlock the editorial