#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
bool can;
int R, C, T, N, x, y, a, b;
cin >> R >> C >> N;
vector<int> green[R];
while (N--) {
cin >> x >> y;
green[x].push_back(y);
}
cin >> T;
while (T--) {
can = 1;
cin >> x >> y >> a >> b;
if (a < x || b < y) {
cout << "No\n";
continue;
}
for (; x < a; x++) {
auto it = lower_bound(green[x].begin(), green[x].end(), y);
if (it == green[x].end()) {
can = 0;
cout << "No\n";
break;
} else if ((y = *it) > b) {
can = 0;
cout << "No\n";
break;
}
}
if (can) {
cout << "Yes\n";
continue;
}
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
1 ms |
348 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
1 ms |
600 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
554 ms |
1048576 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
521 ms |
1048576 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
513 ms |
1048576 KB |
Execution killed with signal 9 |
2 |
Halted |
0 ms |
0 KB |
- |