You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
702 B
21 lines
702 B
#include <bits/stdc++.h>
|
|
//使用万能头文件不要用的变量名:y1, next, time, rand
|
|
using namespace std;
|
|
|
|
int n, m, t1, t2, _map[1000][1000], last[1000][1000], k, i, j, x1, x2, yy1, yy2;
|
|
|
|
int main() {
|
|
scanf("%d%d%d%d", &n, &m, &t1, &t2);
|
|
for (k = 1; k <= t1; k++) {
|
|
scanf("%d%d%d%d", &x1, &yy1, &x2, &yy2);
|
|
for (i = x1; i <= x2; i++)
|
|
for (j = yy1; j <= yy2; j++) {
|
|
_map[i][j]++; //轰炸次数
|
|
last[i][j] = k; //记录最后一次
|
|
}
|
|
}
|
|
for (k = 1; k <= t2; k++) {
|
|
scanf("%d%d", &x1, &yy1);
|
|
if (_map[x1][yy1] != 0) printf("Y %d %d\n", _map[x1][yy1], last[x1][yy1]); else printf("N");
|
|
}
|
|
} |