标签:poj
判断下就好,直接贴代码。
//poj 3386
//sep9
#include <iostream>
using namespace std;
int A,a,B,b,P;
int judge()
{
	if(A+B<=P)
		return 1;	
	if(A>B){
		swap(A,B);
		swap(a,b);
	}
	if(B>P)
		return 0;
	if(A>b)
		return 0;
	return 1;
}
int main()
{
	scanf("%d%d%d%d%d",&A,&a,&B,&b,&P);
	if(judge()==1)
		printf("Yes\n");
	else
		printf("No\n");		
} poj 3386 Halloween Holidays 水题
标签:poj
原文地址:http://blog.csdn.net/sepnine/article/details/43083263