(stars: list[list[int]], s: list[int])
| 5 | return sum(abs(a-b) for a,b in zip(s1,s2)) |
| 6 | |
| 7 | def pop_constellation(stars: list[list[int]], s: list[int]): |
| 8 | if s not in stars: |
| 9 | return |
| 10 | stars.remove(s) |
| 11 | for s2 in [s2 for s2 in stars if dist(s,s2) < 4]: |
| 12 | pop_constellation(stars, s2) |
| 13 | |
| 14 | @aoc.main('25') |
| 15 | def main(indata: str) -> tuple[int,str]: |