653. winoros tree

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/weixin_45746839/article/details/102766907

Here Insert Picture Description

#include<stdio.h>
int judge(int a,int b,int c){
	int ist=0;
	if(a+b>c&&b+c>a&&a+c>b) ist=1;
	return (ist);
}
int main(){
	int x1,x2,x3,x4;
	int t;
	scanf("%d",&t);
	for(;t>0;t--){
		scanf("%d %d %d %d",&x1,&x2,&x3,&x4);
		int ist;
		ist=judge(x1,x2,x3);
		if(ist) printf("YES\n");
		else {
			ist=judge(x1,x2,x4);
			if(ist) printf("YES\n");
			else {
				ist=judge(x1,x3,x4);
				if(ist) printf("YES\n");
				else {
					ist=judge(x4,x2,x3);
					if(ist) printf("YES\n");
					else printf("NO\n");
				}
			}
		}	
	}

	return 0;
}



Guess you like

Origin blog.csdn.net/weixin_45746839/article/details/102766907