'commit'
This commit is contained in:
21
LuoGu/RuMen/P1830.cpp
Normal file
21
LuoGu/RuMen/P1830.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#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");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user