QOJ.ac

QOJ

Límite de tiempo: 2.0 s Límite de memoria: 256 MB Puntuación total: 100

#12753. 坟墓

Estadísticas

Gerard 正在开发一款万圣节电脑游戏。游戏在一个矩形的墓地中进行,墓地里有一座矩形的教堂。在游戏过程中,玩家需要在墓地上放置新的矩形坟墓。坟墓必须完全位于墓地范围内,且不能与教堂重叠。坟墓可以接触墓地或教堂的边界。

Gerard 请你编写一个程序,判断是否能够放置一个给定尺寸的新坟墓,或者判断空间是否不足。

输入格式

第一行包含两对整数:$x_1, y_1, x_2, y_2$ ($-10^9 \le x_1 < x_2 \le 10^9$; $-10^9 \le y_1 < y_2 \le 10^9$),表示墓地左下角和右上角的坐标。第二行包含两对整数:$x_3, y_3, x_4, y_4$ ($x_1 < x_3 < x_4 < x_2$; $y_1 < y_3 < y_4 < y_2$),表示教堂左下角和右上角的坐标。

第三行包含两个整数 $w, h$ ($1 \le w, h \le 10^9$),表示新坟墓的宽和高。长度为 $w$ 的边应沿 $OX$ 轴放置,长度为 $h$ 的边应沿 $OY$ 轴放置。

输出格式

输出文件仅包含一行:如果可以放置新坟墓,输出 “Yes”;如果空间不足,输出 “No”。

样例

样例输入 1

1 1 11 8
2 3 8 6
3 2

样例输出 1

Yes

样例输入 2

1 1 11 8
2 3 8 6
4 3

样例输出 2

No

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.