[Solution] Greater Average CodeChef Solution 2022
Problem
You are given numbers and .
Determine whether the average of and is strictly greater than or not?
NOTE: Average of and is defined as . For example, average of and is , average of and is .
Input Format
- The first line of input will contain a single integer , denoting the number of test cases.
- Each test case consists of integers and .
Output Format
For each test case, output YES
if average of and is strictly greater than , NO
otherwise.
You may print each character of the string in uppercase or lowercase (for example, the strings YeS
, yEs
, yes
and YES
will all be treated as identical).
Explanation:
Test case : The average value of and is which is strictly greater than .
Test case : The average value of and is which is strictly greater than .
Test case : The average value of and is which is not strictly greater than .
Test case : The average value of and is which is not strictly greater than .
Test case : The average value of and is which is strictly greater than .
No comments:
Post a Comment