POJ3386-Halloween Holidays
来源:互联网 发布:单片机 以太网MAC 编辑:程序博客网 时间:2024/06/05 02:49
Description
Planet Cucurbita is inhabited with intelligent pumpkins. These pumpkins are not only extremely clever, they also are fond of tourism. One of their main routes is the Earth during Halloween.
As you know, pumpkins cannot move by themselves (intelligent pumpkins are not an exception), so they make somebody else to transport them. In the case of Halloween this is done by humans. First, they make people to grow special biological docking stations, then prepare the stations (people cut special holes, fire candles etc – you know the procedure), and after these preparations pumpkins come and have fun. People usually do not see anything and think that this is just a holiday and that this holiday is for humans, but remember – if somebody is frightened at Halloween, he was frightened not by his not-very-friendly friends, but by alien pumpkins.
To use the biological docking station, a pumpkin must have a special transmitter. It’s main elements are two rings made of gold and for some unexplainable reasons these rings should be cut from one round plate. The sizes of these rings (inner and outer radii) are pumpkin-specific, so each alien should order a special set for himself.
Mr. Calabaza, an adolescent pumpkin, wants to make his first trip to the Earth. He found a discount plate, which was not redeemed by a previous customer, and it is necessary to check, whether this plate allows Mr. Calabaza to cut the rings he needs from it, or he should order a new larger plate.
Input
The input file contains five integer numbers A, a, B, b, P (0 < A, a, B, b, P ≤
Output
Output a word “Yes” if the plate suits Mr. Calabaza, or a word “No” if he needs to order another one.
Sample Input
2 1 5 3 6
Sample Output
Yes
Hint
Source
题意:有一个圆盘和两个圆环,问圆盘能否容纳两个圆环
#include <iostream> #include <cstdio> #include <cstring> #include <string> #include <algorithm> #include <cmath> #include <map> #include <cmath> #include <set> #include <stack> #include <queue> #include <vector> #include <bitset> #include <functional> using namespace std;#define LL long long const int INF = 0x3f3f3f3f;int main(){int A, a, B, b, P;while (~scanf("%d%d%d%d%d", &A, &a, &B, &b, &P)){if ((a >= B&&A <= P) || (b >= A&&B <= P) || (A + B <= P)) printf("Yes\n");else printf("No\n");}return 0;}
- 【POJ】:POJ3386 Halloween Holidays
- POJ3386-Halloween Holidays
- poj 3386 Halloween Holidays
- poj 3386 Halloween Holidays 水题
- poj3386
- poj3386
- 北大ACM POJ 3386 Halloween Holidays
- POJ 3386 Halloween Holidays(水题)
- POJ 3386 Halloween Holidays(计算几何)
- Holidays
- Holidays
- My holidays
- A. Holidays
- Holidays - IELTS speaking topics
- CF - 44C - Holidays
- ZOJ-3088 Easter Holidays
- zoj 3088 Easter Holidays
- CodeForces - 44C Holidays
- 人机大战,历史的见证
- 按TLV格式拆分APDU指令
- React+DVA开发实践
- Jsoup+JavaMail实现自动投票,验证邮箱功能
- 回顾集合
- POJ3386-Halloween Holidays
- JNDI的用法
- 一点杂谈
- ARMCC和GCC编译ARM代码的软浮点和硬浮点问题
- java语言学习之不使用变量交换两个数
- iis配置ftp
- error: unable to unlink old 'antzb-web/src/main/webapp/js/ny-details.js': Invalid argument
- 小京东v5安装笔记
- 每天自动爬取momentum壁纸并保存