diff options
-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()) |