(indata: str)
| 67 | |
| 68 | @aoc.main('20') |
| 69 | def main(indata: str) -> tuple[int,int]: |
| 70 | _, regex = parse_regex(indata[1:-1], 0) |
| 71 | m = defaultdict(set) |
| 72 | apply_regex(m,regex,[(0,0)]) |
| 73 | distances = bfs_distances(m) |
| 74 | return max(distances), sum(d >= 1000 for d in distances) |
| 75 | |
| 76 | if __name__ == "__main__": |
| 77 | main() |
no test coverage detected