码迷,mamicode.com
首页 > 其他好文 > 详细

poj 3386 Halloween Holidays 水题

时间:2015-01-24 10:12:55      阅读:174      评论:0      收藏:0      [点我收藏+]

标签: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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!