P3717 [AHOI2017 Middle School Division] cover
Background
The following is a simplified version that does not change the meaning of the problem.
Description
On an $n\times n$ grid (indexed from $1$), there are $m$ detectors, each with a detection radius $r$. Among these $n\times n$ points, how many points can be detected.
Input Format
The first line contains $3$ integers $n,m,r$.
Each of the next $m$ lines contains two integers $x,y$, representing the coordinates of the $i$-th detector.
Output Format
Output the number of points that can be detected.
Explanation/Hint
Constraints: $1\le n,m\le 100$.
Translated by ChatGPT 5