Pagini recente » Cod sursa (job #1533) | Cod sursa (job #2386175) | Cod sursa (job #1785816) | Cod sursa (job #1723629) | Cod sursa (job #43543)
Cod sursa(job #43543)
var n,m,l,h,a,b,nr,i,j:longint;
x,y:array[1..50001]of longint;
g,f:text;
begin
assign(f,'ograzi.in');
reset(f);
readln(f,n,m,l,h);
for i:=1 to n do readln(f,x[i],y[i]);
n:=n+1;
for i:=1 to m do begin
readln(f,a,b);
x[n]:=a;
y[n]:=b;
j:=1;
while (a<x[j])or(b<y[j])or(a-x[j]>l)or(b-y[j]>h) do j:=j+1;
if j<n then nr:=nr+1;
end;
assign(g,'ograzi.out');
rewrite(g);
write(g,nr);
close(g);
end.