653. winoros的树

653. winoros的树

#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;
}



上一篇:10-排序5 PAT Judge (25 分)


下一篇:Long Jumps CodeForces - 479D