Pagini recente » Cod sursa (job #657085) | Cod sursa (job #3249097) | Cod sursa (job #258892) | Cod sursa (job #1818593) | Cod sursa (job #24972)
Cod sursa(job #24972)
program ograzi_pas;
{$apptype console}
uses sysutils;
var fis:text;
x, y:array[1..50000] of longint;
W, H, 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[j]) and (xx <= x[j] + w) and
(yy >= y[j]) and (yy <= y[j] + h) then begin
inc(num);
break;
end;
end;
close(fis);
assign(fis, 'ograzi.out'); rewrite(fis);
writeln(fis, num);
close(fis);
end.