Compare commits

..

3 commits

Author SHA1 Message Date
d2e2d79d71 2023: d12: ex2: add solution 2023-12-12 19:29:49 +01:00
15b8b5aaeb 2023: d12: ex2: add input 2023-12-12 19:29:49 +01:00
70fdb4e606 2023: d12: ex1: add solution 2023-12-12 19:29:49 +01:00

View file

@ -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: