aboutsummaryrefslogtreecommitdiff
path: root/2021
diff options
context:
space:
mode:
authorThomas Voss <thomasvoss@live.com> 2021-12-15 22:22:15 +0100
committerThomas Voss <thomasvoss@live.com> 2021-12-15 22:22:15 +0100
commitd418e965fb28182dd23b67c450d5cde5ba72742f (patch)
treeb258fdacd025498f54a14d5f28dc27857bae3b2e /2021
parentf2f95f765c109b19a28fb962ded0df418747a18b (diff)
Don't add the elongate function to part 1
Diffstat (limited to '2021')
-rw-r--r--2021/15/puzzles.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/2021/15/puzzles.py b/2021/15/puzzles.py
index 0b294f5..dd19eef 100644
--- a/2021/15/puzzles.py
+++ b/2021/15/puzzles.py
@@ -16,6 +16,7 @@ class Node(NamedTuple):
return self.r < other.r
+# START PART 2
def elongate(grid: matrix[int]) -> matrix[int]:
ngrid: matrix[int] = []
inc = lambda n: 1 if n == 9 else n + 1
@@ -30,6 +31,7 @@ def elongate(grid: matrix[int]) -> matrix[int]:
ngrid.append(list(map(inc, ngrid[i * l + j])))
return ngrid
+# END PART 2
def main() -> None: