Pagini recente » Cod sursa (job #1418552) | Cod sursa (job #3171194) | Cod sursa (job #2136264) | Cod sursa (job #2365293) | Cod sursa (job #253842)
Cod sursa(job #253842)
program pascal;
var f,g:text; n,m,i,j,nr,a,b,r:longint; x,y:array[1..100000] of longint;
procedure citire;
begin
assign(f,'grendizer.in');reset(f); assign(g,'grendizer.out'); rewrite(g);
readln(f,n,m);
for i:=1 to n do readln(f,x[i],y[i]);
for i:=1 to m do
begin
readln(f,a,b,r); nr:=0;
for j:=1 to n do
if abs(a-x[j])+abs(b-y[j])=r then inc(nr);
writeln(g,nr);
end;
end;
begin
citire;
close(f);
close(g);
end.