大佬们能指点一下为什么这样的runtime怎么半嘛,最后两个样例re了
#include "bits/stdc++.h"
using namespace std;
const int N = 2 * 1e3 + 10;
int n, m, cnt;
int a[N][N], b[N][N];
int main() {
ios::sync_with_stdio(false);
cin >> n >> m;
for (int i = 1; i <= n; i++) {
int x1, y1, x2, y2;
cin >> x1 >> y1 >> x2 >> y2;
cnt++;
for (int j = x1; j <= x2 - 1; j++) {
for (int k = y1; k <= y2 - 1; k++) {
a[j][k] += 1;
b[j][k] = cnt;
}
}
}
while (m--) {
int x = 0, y = 0;
cin >> x >> y;
if (a[x][y] >= 1) {
cout << "YES ";
cout << a[x][y] << " " << b[x][y] << endl;
} else cout << "NO" << endl;
}
}