diff options
Diffstat (limited to '2021/12/puzzles.py')
-rw-r--r-- | 2021/12/puzzles.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/2021/12/puzzles.py b/2021/12/puzzles.py index a395f5c..ede75db 100644 --- a/2021/12/puzzles.py +++ b/2021/12/puzzles.py @@ -16,9 +16,8 @@ def solve(paths: defaultdict[str, list[str]], path: str, flag: bool = False) -> # END PART 1 START PART 2 elif dest != "start": if dest.islower() and dest in tokens: - if flag: - continue - acc += solve(paths, f"{path},{dest}", True) + if not flag: + acc += solve(paths, f"{path},{dest}", True) else: acc += solve(paths, f"{path},{dest}", flag) # END PART 2 |