Pagini recente » Cod sursa (job #2707910) | Cod sursa (job #170792) | Cod sursa (job #2870094) | Cod sursa (job #2075959) | Cod sursa (job #24971)
Cod sursa(job #24971)
program ograzi_pas;
{$apptype console}
uses sysutils;
var fis:text;
x, y:array[1..50000] of longint;
W, H, sqrtn, n, i, j, m, num, xx, yy :longint;
begin
assign(fis, 'ograzi.in');reset(fis);
readln(fis, n, m, w, h);
for i := 1 to n do readln(fis, x[i], y[i]);
num := 0;
for i := 1 to m do begin
readln(fis, xx, yy);
for j := 1 to n do
if (xx >= x[i]) and (xx <= x[i] + w) and
(yy >= y[i]) and (yy <= y[i] + h) then begin
inc(num);
break;
end;
end;
close(fis);
assign(fis, 'ograzi.out'); rewrite(fis);
writeln(fis, num);
close(fis);
end.