day 16 part 2 solved
commite1bf95210835e764c68b84b37e802689df15959f
authorEric Blake <eblake@redhat.com>
Tue, 19 Dec 2023 19:18:59 +0000 (19 13:18 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 19 Dec 2023 19:28:02 +0000 (19 13:28 -0600)
tree9a7d06352c2f464a796a10fef41b3679478f3543
parent8096efdcf763a309ff8653e8a5ff31f2ec86686f
day 16 part 2 solved

D'oh, I typo'd the rays entering to the left.  Now takes ~24s;
probably some fertile room for optimization.

For an NxN grid, each of the 4N scans visits up to 4*N*N nodes.  Lots
of paths are being rescanned, for O(n^3) work.  But memoizing how many
nodes were scanned after a split will only be useful if I can come up
with a convenient way to not over-count intersections with the portion
of the incoming ray before the splitter.
2023/day16.m4