http://acm.hdu.edu.cn/showproblem.php?pid=2039
这道题主要注意float和三角形的判定条件a+b>c&&b+c>a&&a+c>b,否则容易WR
#include <iostream> using namespace std; int main() { int n; cin>>n; float a,b,c; while(n--){ cin>>a>>b>>c; if(a+b>c&&b+c>a&&a+c>b) cout<<"YES"<<endl; else cout<<"NO"<<endl; } return 0; }