From c15defa16e337ab48db1ba22ccb259dcc2566060 Mon Sep 17 00:00:00 2001 From: Dmitry Fedotov Date: Mon, 6 Jan 2025 02:20:38 +0300 Subject: [PATCH] add comment --- day16/code.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/day16/code.py b/day16/code.py index 380733b..dee3d3f 100644 --- a/day16/code.py +++ b/day16/code.py @@ -43,7 +43,7 @@ class Maze: def search(m: Maze) -> int: x, y = m.start() - state = (x, y, 1, 0) + state = (x, y, 1, 0) # x diff is 1 (we are facing right), y diff is 0 queue = [] visited = set() @@ -75,6 +75,7 @@ def search(m: Maze) -> int: visited.add(state) heapq.heappush(queue, (cost, state)) + return -1 def solve1(lines: list[list[str]]):