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

建议使用的浏览器:

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

5480:Conturbatio

题目描述
There are many rook on a chessboard, a rook can attack the row and column it belongs, including its own place.

There are also many queries, each query gives a rectangle on the chess board, and asks whether every grid in the rectangle will be attacked by any rook?
输入解释
The first line of the input is a integer $T$, meaning that there are $T$ test cases.

Every test cases begin with four integers $n , m , K , Q$.
$K$ is the number of Rook, $Q$ is the number of queries.

Then $K$ lines follow, each contain two integers $x , y$ describing the coordinate of Rook.

Then $Q$ lines follow, each contain four integers $x1, y1, x2, y2$ describing the left-down and right-up coordinates of query.

$1\leq n , m , K , Q \leq 100,000$.

$1\leq x \leq n , 1 \leq y \leq m$.

$1\leq x1 \leq x2 \leq n , 1 \leq y1 \leq y2 \leq m$.
输出解释
For every query output "Yes" or "No" as mentioned above.
输入样例
2
2 2 1 2
1 1
1 1 1 2
2 1 2 2
2 2 2 1
1 1
1 2
2 1 2 2
输出样例
Yes
No
Yes

提示
Huge input, scanf recommended.
来自杭电HDUOJ的附加信息
Recommend hujie

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

源链接: HDU-5480

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

共提交 0

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