http://acm.hdu.edu.cn/showproblem.php?pid=2039
两边之和大于第三边
View Code
1 #include<stdio.h> 2 int main() 3 { 4 double a,b,c; 5 int n; 6 while(scanf("%d",&n)!=EOF) 7 while(n--) 8 { 9 scanf("%lf%lf%lf",&a,&b,&c); 10 if(a+b>c&&a+c>b&&c+b>a) 11 printf("YES\n"); 12 else printf("NO\n"); 13 } 14 return 0; 15 }