90分,#5过不了
查看原帖
90分,#5过不了
1356734
huyouxi楼主2025/1/20 07:43
#include <bits/stdc++.h>

using namespace std;

int main() {
    int n, a = -1;
    cin >> n;
    int x1[n], y1[n], x2[n], y2[n], x, y;
    for (int i = 0; i < n; i++) {
        cin >> x1[i] >> y1[i] >> x2[i] >> y2[i];
    }
    cin >> x >> y;
    for (int i = 0; i < n; i++) {
        if (x1[i] <= x && y1[i] <= y && x2[i] >= x && y2[i] >= y) {
            a = i + 1;
        }
    }
    cout << a;
    return 0;
}
2025/1/20 07:43
加载中...