mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-12-24 18:31:59 +00:00
P1830 轰炸III
R52219097
This commit is contained in:
parent
f19172d756
commit
a47b17b9fd
28
Luogu/problem/P1830/P1830.cpp
Normal file
28
Luogu/problem/P1830/P1830.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
pair<int, int> boom[105][105];
|
||||
|
||||
int main() {
|
||||
int n, m, x, y, x1, y1, x2, y2;
|
||||
cin >> n >> m >> x >> y;
|
||||
for (int i = 1; i <= x; i++) {
|
||||
cin >> x1 >> y1 >> x2 >> y2;
|
||||
for (int j = x1; j <= x2; j++) {
|
||||
for (int k = y1; k <= y2; k++) {
|
||||
boom[j][k].first++;
|
||||
boom[j][k].second = i;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (int i = 1; i <= y; i++) {
|
||||
cin >> x1 >> y1;
|
||||
if (boom[x1][y1].first) {
|
||||
cout << "Y " << boom[x1][y1].first << ' ' << boom[x1][y1].second << endl;
|
||||
} else {
|
||||
cout << "N" << endl;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user