Run ID:60931

提交时间:2023-11-25 14:36:03

#include<bits/stdc++.h> using namespace std; struct dt{ int x1,y1,x2,y2; }; int main(){ int n,a,b,g,k,x,y,t=-1; cin>>n; dt c[n]; for(int i=0;i<n;i++){ cin>>a>>b>>g>>k; c[i].x1=a; c[i].y1=b; c[i].x2=a+g; c[i].y2=b+k; } cin>>x>>y; for(int i=0;i<n;i++){ if(c[i].x1<=x&&c[i].x2>=x&&c[i].y1<=y&&c[i].y2>=y){ t=i+1; } } cout<<t; }