当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6514:Monitor

题目描述
Xiaoteng has a large area of land for growing crops, and the land can be seen as a rectangle of $n \times m$.

But recently Xiaoteng found that his crops were often stolen by a group of people, so he decided to install some monitors to find all the people and then negotiate with them.

However, Xiao Teng bought bad monitors, each monitor can only monitor the crops inside a rectangle. There are $p$ monitors installed by Xiaoteng, and the rectangle monitored by each monitor is known.

Xiao Teng guess that the thieves would also steal $q$ times of crops. he also guessed the range they were going to steal, which was also a rectangle. Xiao Teng wants to know if his monitors can see all the thieves at a time.
输入解释
There are mutiple test cases.

Each case starts with a line containing two integers $n,m (1 \leq n,1 \leq m , n \times m \leq 10^7)$ which represent the area of the land.

And the secend line contain a integer $p(1 \leq p \leq 10^6)$ which represent the number of the monitor Xiaoteng has installed. This is followed by p lines each describing a rectangle. Each of these lines contains four intergers $x_1,y_1,x_2~and~y_2(1\leq x_1 \leq x_2 \leq n,1\leq y_1 \leq y_2 \leq m)$ ,meaning the lower left corner and upper right corner of the rectangle.

Next line contain a integer $q(1 \leq q\leq 10^6)$ which represent the number of times that thieves will steal the crops.This is followed by q lines each describing a rectangle. Each of these lines contains four intergers $x_1,y_1,x_2~and~y_2(1\leq x_1 \leq x_2 \leq n,1\leq y_1 \leq y_2 \leq m)$,meaning the lower left corner and upper right corner of the rectangle.
输出解释
For each case you should print $q$ lines.

Each line containing YES or NO mean the all thieves whether can be seen.
输入样例
6 6
3
2 2 4 4
3 3 5 6
5 1 6 2
2
3 2 5 4
1 5 6 5
输出样例
YES
NO

提示
In the picture,the red solid rectangles mean the monitor Xiaoteng installed, and the blue dotted rectangles mean the area will be stolen.
来自杭电HDUOJ的附加信息
Recommend liuyiding

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6514

最后修改于 2020-10-25T23:32:00+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
6000/3000MS(Java/Others) 163840/163840K(Java/Others)