diff --git a/2023/d12/ex1/ex1.py b/2023/d12/ex1/ex1.py index e713128..4e84e37 100755 --- a/2023/d12/ex1/ex1.py +++ b/2023/d12/ex1/ex1.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +import functools import sys @@ -10,6 +11,7 @@ def solve(input: list[str]) -> int: for record, groups in map(str.split, input) ] + @functools.cache def solve_line(record: str, groups: tuple[int, ...]) -> int: # Empty string must have no groups left, or it's not a solve if len(record) == 0: