#P1830. 轰炸III
轰炸III
Description
After the bombings, there are key points. The commander wants to know whether each of them was ever bombed; if yes, how many times, and in which round the last time occurred.
Input Format
The first line contains four integers, .
The next lines each contain four integers , representing the top-left and bottom-right coordinates of the bombed rectangle (for example, means the bombed area is the rectangle from to ).
The next lines each contain two integers, representing the coordinates of a key point.
Output Format
Output lines. In each line, the first character is Y or N, indicating whether it was bombed; if it is Y, then after a single space output two integers: the number of times it was bombed and the round number of the last time.
10 10 2 3
1 1 5 5
5 5 10 10
3 2
5 5
7 1
Y 1 1
Y 2 2
N
Hint
For of the testdata, .
Translated by ChatGPT 5
京公网安备 11011102002149号