#P1847. 轰炸II
轰炸II
Description
A city has been bombed times. Each time, the bombed area is a rectangle whose sides are parallel to the axes.
After the bombings, there are key points. The commander wants to know whether each point has ever been bombed; if so, how many times it was bombed, and in which round it was last bombed.
Input Format
The first line contains two integers: .
Each of the next lines contains four integers: , , , , representing the top-left and bottom-right coordinates of the bombed rectangle (for example, 1 3 7 10 means the bombed area is the rectangle from to ).
Then the next lines each contain two integers, representing the coordinates of a key point.
Output Format
Output lines.
In each line, the first token is YES or NO, indicating whether the point was bombed. If it is YES, after a space output two integers: the number of times it was bombed, and the round number of the last bombing.
1 1
1 1 10 10
11 11
NO
Hint
Translated by ChatGPT 5
京公网安备 11011102002149号