27 lines
725 B
Python
27 lines
725 B
Python
# Unfinish
|
|
from typing import Tuple, List
|
|
import math
|
|
|
|
n, m, r = input().split(" ")
|
|
locations: List[Tuple[str, str]] = []
|
|
for i in range(int(m)):
|
|
location: Tuple[str, str] = tuple(input().split(" "))
|
|
locations.append(location)
|
|
|
|
map = [[0 for _ in range(int(n))] for _ in range(int(n))]
|
|
count = 0
|
|
|
|
for i in range(int(n)):
|
|
for j in range(int(n)):
|
|
if map[i][j] == 0:
|
|
for k in range(int(m)):
|
|
distance = math.sqrt(
|
|
(int(locations[k][0]) - i) ** 2 + (int(locations[k][1]) - j) ** 2
|
|
)
|
|
if distance <= float(r):
|
|
map[i][j] = 1
|
|
count = count + 1
|
|
break
|
|
|
|
print(count)
|
|
print(map) |