From 1606066809130d544aaf722d617a1df5670602cb Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Thu, 9 Dec 2021 15:55:58 +0700 Subject: [aoc/2021] Finish day 9 Pathetic me even forgot how to implement forest fire )-; --- others/other/nuoc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'others/other') diff --git a/others/other/nuoc.py b/others/other/nuoc.py index 9fcff54..4d53861 100755 --- a/others/other/nuoc.py +++ b/others/other/nuoc.py @@ -17,7 +17,7 @@ visited = ([[True] * n] result = 0 while queue: - h, i, j = heappop(queue) + h, i, j = heappop(queue) for x, y in (i + 1, j), (i - 1, j), (i, j + 1), (i, j - 1): if 0 <= x < m and 0 <= y < n and not visited[x][y]: result += max(0, h - height[x][y]) -- cgit 1.4.1