Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def solution(X, Y):
- points = set((x, y) for (x, y) in zip(X, Y))
- return sum(1 for p1 in points for p2 in filter(lambda p2: p2[0] < p1[0] and p2[1] < p1[1], points) if (2 * p1[0] - p2[0], p2[1]) in points and (p1[0], -p1[1] + 2 * p2[1]) in points)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement