from math import sqrt
# 输入
search = []
input_1 = input().split()
n = int(input_1[0])
m = int(input_1[1])
r = int(input_1[2])
for i in range(m):
search.append(list(map(int,input().split())))
# 枚举
count = 0
for i in range(1, n + 1):
for j in range(1, n + 1):
for s in search:
if ((s[0] - i)**2 + (s[1] - j)**2) <= r**2:
count += 1
break
print(count)
洛谷(Python) P3717 [AHOI2017初中组]cover
最新推荐文章于 2023-04-25 15:48:59 发布