1828. Queries on Number of Points Inside a Circle
Содержание
class Solution:
def countPoints(
self, points: List[List[int]], queries: List[List[int]]
) -> List[int]:
res = []
for x, y, r in queries:
cnt = 0
for i, j in points:
dx, dy = i - x, j - y
cnt += dx * dx + dy * dy <= r * r
res.append(cnt)
return res