#CF1850A. To My Critics

    ID: 6855 传统题 1000ms 256MiB 尝试: 1 已通过: 1 难度: 10 上传者: 标签>模拟排序CodeforcesCodeforces Round 886(Div4)Div4ACF1850A800

To My Critics

题目描述

Suneet有三个数字 ab a , b c c

由于数学不是他的强项,他请你判断是否可以选择任意两个数字使它们的和大于或等于 10 10

如果存在这样一对数字,输出 YES;否则,输出 NO

输入格式

第一行包含一个整数 t((1t1000 t (( 1 \leq t \leq 1000 )——测试用例的数量。

每个测试用例仅包含三个数字 abc((0a,b,c9 a , b , c (( 0 \leq a, b, c \leq 9 )。

输出格式

对于每个测试用例,如果存在这样一对数字,输出 YES;否则,输出 NO

Translated By

https://www.luogu.com.cn/user/661274

样例

5
8 1 2
4 4 5
9 9 9
0 0 0
8 5 3
YES
NO
YES
NO
YES

样例说明

For the first test case, by choosing the digits 8 8 and 2 2 we can obtain a sum of 8+2=10 8 + 2 = 10 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 10 10 , 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 18 18 , thus the output should be "YES".

来源

Codeforces 1850A,英文题名 To My Critics。