Gold Mining solution codechef
Chef has decided to go to a gold mine along withof his friends (thus, total people including Chef go to the gold mine).
The gold mine contains a total ofkg of gold. Every person has the capacity of carrying up kg of gold.
Will Chef and his friends together be able to carry up all the gold from the gold mine assuming that they can go to the mine exactly once.
Input Format Gold Mining solution codechef
- First line will contain , number of testcases. Then the testcases follow.
- Each testcase contains of a single line of input, three integers .
Output Format Gold Mining solution codechef
For each testcase, output
"YES" if you and your friends can carry all the gold, otherwise output
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).
Constraints Gold Mining solution codechef
Sample Input 1 Gold Mining solution codechef
3 2 10 3 2 10 4 1 5 10
Sample Output 1 Gold Mining solution codechef
NO YES YES
Explanation Gold Mining solution codechef
Test Case: You along with your friends can only carry a maximum of kg of gold.
Test Case: It is possible to carry all the gold from the mine. You can carry kg of gold and your both friends carry kg of gold each, thus carrying the whole kg of gold.