[Solution] Dominant Army CodeChef Solution | CodeChef Problem Solution 2022
In the medieval age, there were kingdoms , , and . The army of these kingdom had , , and soldiers respectively.
You are given that an army with soldiers can defeat an army with soldiers only if .
An army is said to be dominant if it can defeat both the other armies combined. For example, kingdom 's army will be dominant only if .
Solution Click Below:- CLICK HERE
Determine whether any of the armies is dominant or not.
Input Format
- The first line contains a single integer - the number of test cases. Then the test cases follow.
- The first and only line of each test case contains three integers , , and - the number of warriors in the armies of kingdoms , , and respectively.
Output Format
For each test case, output YES
if any of the armies is dominant. Otherwise, output NO
.
You may print each character of YES
and NO
in uppercase or lowercase (for example, yes
, yEs
, Yes
will be considered identical).
Constraints
Join Now for Solution:-
No comments:
Post a Comment