diff options
author | Tomasz Kramkowski <tomasz@kramkow.ski> | 2022-12-16 16:12:24 +0000 |
---|---|---|
committer | Tomasz Kramkowski <tomasz@kramkow.ski> | 2022-12-16 16:12:24 +0000 |
commit | 67116c06713074e3782ddea2f3658490bf22bf67 (patch) | |
tree | 42004c554ca99d3f28243ab4249abb1f3844b35d | |
parent | 8690ab12904c2673db74ec9fdfc52f5b8d8bf2dc (diff) | |
download | aoc2022-67116c06713074e3782ddea2f3658490bf22bf67.tar.gz aoc2022-67116c06713074e3782ddea2f3658490bf22bf67.tar.xz aoc2022-67116c06713074e3782ddea2f3658490bf22bf67.zip |
16 line length
-rw-r--r-- | 16.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -48,7 +48,8 @@ def recurse(open_valves=frozenset(), current='AA', flow=0, time_left=30): flow + cflow * cost, time_left - cost) best = max(best, new) if current not in open_valves and time_left > 0 and cnode.flow > 0: - best = max(best, recurse(open_valves | {current}, current, flow + cflow, time_left - 1)) + best = max(best, recurse(open_valves | {current}, current, + flow + cflow, time_left - 1)) return best print(recurse()) |