提交时间:2026-01-04 15:42:21

运行 ID: 81224

#include <bits/stdc++.h> using namespace std ; int n ; const int N = 1e4 + 10 ; int a[N] , b[N] , g[N] , k[N] ; int x , y ; int main() { cin >> n ; for(int i = 1 ; i <= n ; i++ ) cin >>a[i] >> b[i] >> g[i] >> k[i] ; cin >> x >> y ; int ans = -1 ; for(int i = 1 ; i <= n ; i++ ) if(x >= a[i] && y >= b[i] && x <= a[i] + g[i] && y <= b[i] + k[i]) ans = i ; cout << ans << endl ; return 0 ; }