(points: list[list[int]])
| 9 | yield from product(range(xmin,xmax+1), range(ymin,ymax+1)) |
| 10 | |
| 11 | def part1(points: list[list[int]]) -> int: |
| 12 | closest = {} |
| 13 | for x,y in bounding_box(points): |
| 14 | distances = [abs(a-x) + abs(b-y) for a,b in points] |
| 15 | d = min(distances) |
| 16 | if distances.count(d) == 1: |
| 17 | closest[(x,y)] = distances.index(d) |
| 18 | return Counter(closest.values()).most_common(1)[0][1] |
| 19 | |
| 20 | def part2(points: list[list[int]]) -> int: |
| 21 | ans = 0 |
no test coverage detected