NC221286. Bomas
描述
输入描述
The first line of input contains two space-separated integers n and q (1 ≤ n, q ≤ 105), where n isthe number of existing bomas and q is the number of queries.Each of the next n lines contains three space-separated integers x, y (−107 ≤ x, y ≤ 107)and r (1 ≤ r ≤ 107), which describe an existing boma with center (x, y) and radius r.Each of the next m lines contains three space-separated integers x, y (−107 ≤ x, y ≤ 107)and r (1 ≤ r ≤ 107), which describe a query boma with center (x, y) and radius r.No two bomas of either type (existing or query) intersect or touch, but they can nest within oneanother.
输出描述
For each query output a line with a single integer, which is the number of animal types the zoo candisplay within the queried region.
示例1
输入:
3 5 0 0 100 0 50 20 0 -50 20 0 0 80 0 0 2 500 0 2 0 50 25 0 0 150
输出:
2 1 1 1 3