首先博主说一下,T1没有最水,只有更水,本来以为noip2014D2T1够水了,但是此题水死了.以下为题解,懒得注释.
#include<stdio.h>
int a[100001],b[100001],g[100001],k[100001];
int main()
{
int n,i,x,y,ans=-1;
scanf("%d",&n);
for(i=1;i<=n;i++)
scanf("%d%d%d%d",&a[i],&b[i],&g[i],&k[i]);
scanf("%d%d",&x,&y);
for(i=1;i<=n;i++)
if(x>=a[i]&&x<=a[i]+g[i]&&y>=b[i]&&y<=b[i]+k[i])
ans=i;
printf("%d",ans);
}