Unable to load image

AoC Day 14 : Sands of time

I won't paste my code yet since my parser just does the needful, and I somehow manage to get overlapping grains of sand, though that doesn't matter in the end.

I'm also seeing a lot of pythonistas having high runtime (1-10s+ and more) and I'm here with the bruteforce grain-by-grain taking 150ms for part 2 (including drawing the final graph lmao). Matlab chads can't stop winning :gigachad2:

EDIT : part 2 webm

16
Jump in the discussion.

No email address required.

>tfw you get the recursive sand-placing logic right first try but fricked up the wall loading

![](/images/16710007748821805.webp)

Jump in the discussion.

No email address required.

I ran into the same thing because I was only rendering walls in one direction (that coincidentally worked for the example, just not the real data).

Jump in the discussion.

No email address required.

MIT Scheme doesn't have this problem

Jump in the discussion.

No email address required.

Link copied to clipboard
Action successful!
Error, please refresh the page and try again.