#P1850A. To My Critics
To My Critics
To My Critics
题面翻译
题目描述
Suneet有三个数字 和 。
由于数学不是他的强项,他请你判断是否可以选择任意两个数字使它们的和大于或等于 。
如果存在这样一对数字,输出 YES
;否则,输出 NO
。
输入格式
第一行包含一个整数 )——测试用例的数量。
每个测试用例仅包含三个数字 )。
输出格式
对于每个测试用例,如果存在这样一对数字,输出 YES
;否则,输出 NO
。
Translated By
题目描述
Suneet has three digits , , and .
Since math isn't his strongest point, he asks you to determine if you can choose any two digits to make a sum greater or equal to .
Output "YES" if there is such a pair, and "NO" otherwise.
输入格式
The first line contains a single integer ( ) — the number of test cases.
The only line of each test case contains three digits , , ( ).
输出格式
For each test case, output "YES" if such a pair exists, and "NO" otherwise.
You can output the answer in any case (for example, the strings "yEs", "yes", "Yes" and "YES" will be recognized as a positive answer).
样例 #1
样例输入 #1
5
8 1 2
4 4 5
9 9 9
0 0 0
8 5 3
样例输出 #1
YES
NO
YES
NO
YES
提示
For the first test case, by choosing the digits and we can obtain a sum of which satisfies the condition, thus the output should be "YES".
For the second test case, any combination of chosen digits won't be at least , thus the output should be "NO" (note that we can not choose the digit on the same position twice).
For the third test case, any combination of chosen digits will have a sum equal to , thus the output should be "YES".
相关
在以下作业中: