#P3717. [AHOI2017初中组] cover

    ID: 2690 远端评测题 1000ms 125MiB 尝试: 0 已通过: 0 难度: 1 上传者: 标签>模拟搜索2017安徽枚举,暴力差分

[AHOI2017初中组] cover

Description

On an n×nn\times n grid (indexed from 11), there are mm detectors, each with a detection radius rr. Among these n×nn\times n points, how many points can be detected.

Input Format

The first line contains 33 integers n,m,rn,m,r. Each of the next mm lines contains two integers x,yx,y, representing the coordinates of the ii-th detector.

Output Format

Output the number of points that can be detected.

5 2 1
3 3
4 2
8

Hint

Constraints: 1n,m1001\le n,m\le 100.

Translated by ChatGPT 5