[恢]hdu 2039

2011-12-14 05:02:21

地址:http://acm.hdu.edu.cn/showproblem.php?pid=2039

题意:中文,判断合法三角形。

mark:wa了一次。输入的是实数不是int,坑爹。

代码:

# include <stdio.h>


int main ()
{
int T ;
double a, b, c ;
scanf ("%d", &T) ;
while (T--)
{
scanf ("%lf%lf%lf", &a, &b, &c) ;
if (a+b<=c || b+c<=a || a+c<=b)
puts ("NO") ;
else puts ("YES") ;
}
return 0 ;
}



原文地址:https://www.cnblogs.com/lzsz1212/p/2314524.html