AC answer
2023-11-28 17:26:56
发布于:安徽
2阅读
0回复
0点赞
#include <bits/stdc++.h>
#define debug freopen("in.txt","r",stdin);freopen("out.txt","w",stdout)
using namespace std;
const int N=10000+5;
int a[N],b[N],g[N],k[N];
int n,x,y;
int ans=-1;
void work()
{
scanf("%d",&n);
for(int i=1;i<=n;i++)
scanf("%d%d%d%d",&a[i],&b[i],&g[i],&k[i]);
scanf("%d%d",&x,&y);
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;
printf("%d",ans);
}
int main()
{
//debug;
work();
return 0;
}
这里空空如也
有帮助,赞一个