Pagini recente » Cod sursa (job #87252) | Cod sursa (job #373466) | Cod sursa (job #2042509) | Cod sursa (job #2302512) | Cod sursa (job #388665)
Cod sursa(job #388665)
Program Zoo;
type sir=array[1..16000] of longint;
var f,g:text;
x,y:sir;
n,i:integer;
m,j,x1,y1,x2,y2,nr:longint;
begin
assign(f,'zoo.in');reset(f);
assign(g,'zoo.out');rewrite(g);
Readln(f,n);
For i:=1 to n do readln(f,x[i],y[i]);
Readln(f,m);
For j:=1 to m do begin
read(f,x1,y1,x2,y2);
nr:=0;
For i:=1 to n do
If (x[i]>=x1) and (y[i]>=y1) and (x[i]<=x2) and (y[i]<=y2) then inc(nr);
writeln(g,nr);
end;
close(f);
close(g);
end.