Run ID:108807
提交时间:2025-01-22 12:11:48
#include<bits/stdc++.h> using namespace std; const maxn = 10010; int a[maxn], b[maxn], w[maxn], h[maxn]; int n; int main() { cin >> n; for (int i = 1; i <= n ; i++) { cin >> a[i] >> b[i] >> w[i] >> h[i]; } cin >> px >> py; for (int i = 1; i <= n; i++) { if (px >= a[i] && px <= a[i] + w[i] && py >= b[i] && py <= b[i] + h[i]) { cout << i << endl; return 0; } } cout << -1 << endl; return 0; }