diff options
author | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2021-12-09 15:55:58 +0700 |
---|---|---|
committer | Nguyễn Gia Phong <mcsinyx@disroot.org> | 2021-12-09 15:55:58 +0700 |
commit | 1606066809130d544aaf722d617a1df5670602cb (patch) | |
tree | 18113b7173853c9f54077bb5918429b97db4d625 /others | |
parent | cb3888c390e424df9572083e9fcabf0cda4c0506 (diff) | |
download | cp-1606066809130d544aaf722d617a1df5670602cb.tar.gz |
[aoc/2021] Finish day 9
Pathetic me even forgot how to implement forest fire )-;
Diffstat (limited to 'others')
-rwxr-xr-x | others/other/nuoc.py | 2 |
1 files changed, 1 insertions, 1 deletions
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]) |