Pagini recente » Cod sursa (job #2349717) | Cod sursa (job #3214818) | Cod sursa (job #2558910) | Cod sursa (job #725337) | Cod sursa (job #25208)
Cod sursa(job #25208)
program peroni33;
uses crt;
type
TMeadow = array[1..10000,1..10000] of 0..1;
var sc, fc, w, h, fs:longint;
M: TMeadow;
procedure Load;
var
f: text;
i, k, l: byte;
x, y: longint;
begin
fs := 0;
Assign(f, 'ograzi.in');
Reset(f);
ReadLn(f, fc, sc, w, h);
for i := 1 to fc do begin
ReadLn(f, x, y);
for k := x to x+w do begin
for l := y to y+h do begin
M[k,l] := 1;
end;
end;
end;
for i := 1 to sc do begin
ReadLn(f, x, y);
if M[x,y] = 1 then inc(fs);
end;
Close(f);
end;
begin ClrScr;
Load;
WriteLn(fs);
end.