#P5867. [SEERC 2018] Fishermen
[SEERC 2018] Fishermen
Description
The sea can be considered as the first quadrant of the Cartesian coordinate system. There are fish in the sea, and each fish has a two-dimensional coordinate. There may be multiple fish at the same point.
There are fishermen on the shore. Each fisherman has an coordinate, and their coordinate is always .
Each fisherman has a fishing rod of length , so he can catch fish whose distance to him is at most . The distance between a fisherman with coordinate and a fish at coordinate is .
For each fisherman, compute how many fish he can catch.
Input Format
The first line contains three integers and $l \ (1 \leq n,m \leq 2 \cdot 10^5, 1 \leq l \leq 10^9)$, representing the number of fish, the number of fishermen, and the length of the fishing rod.
The next lines each contain two integers and , representing the coordinates of each fish.
The next line contains integers , representing the coordinate of each fisherman.
Output Format
For each fisherman, output one line with the answer.
8 4 4
7 2
3 3
4 5
5 1
2 2
1 4
8 4
9 4
6 1 4 9
2
2
3
2
Hint
The picture shows the region where the third fisherman in the sample above can catch fish.

Translated by ChatGPT 5
京公网安备 11011102002149号