- 铺地毯
- 2017-10-24 20:53:22 @
#include<iostream>
#include<cstdio>
int main()
{
// freopen("in.txt","r",stdin);
int n,c,a[101],b[100001],j[100001],k[100001],x,y,m[100001];
scanf("%d",&n);
for(int i=1;i<=n;i++)
{
scanf("%d%d%d%d",&a[i],&b[i],&j[i],&k[i]);
m[i]=i;//m[i]标记地毯的号数
}
scanf("%d%d",&x,&y);
for(int i=1;i<=n;i++)
{
if(x>=a[i]&&x<=(a[i]+j[i])&&y>=b[i]&&y<=(b[i]+k[i])) c=m[i];
else c=-1;
}
printf("%d\n",c);
return 0;
}
0 条评论
目前还没有评论...