Pagini recente » Cod sursa (job #1169907) | Cod sursa (job #1620674) | Cod sursa (job #1379634) | Cod sursa (job #67887) | Cod sursa (job #31496)
Cod sursa(job #31496)
#include<stdio.h>
struct {int x,y;}a[50001];
int i,j,n,m,l,h,x,y,nr;
int ver()
{for(i=1;i<=n;i++)
if(a[i].x<=x&&a[i].x+l>=x&&a[i].y<=y&&a[i].y+h>=y) return 1;
return 0;}
int main()
{freopen("ograzi.in","r",stdin);
freopen("ograzi.out","w",stdout);
scanf("%d %d %d %d",&n,&m,&l,&h);
for(i=1;i<=n;i++)
scanf("%d %d",&a[i].x,&a[i].y);
for(;m;m--)
{scanf("%d %d",&x,&y);
nr=nr+ver();}
printf("%d",nr);
fclose(stdout);
return 0;}