Discussion thread for day 11 of the Advent of Code - https://adventofcode.com/2024/day/11
today challenge remind me about 2021 day 6 challenge. It look alike.
Absolutely loved this problem. Part 2 took me a few minutes to realize the trick that changes the problem from being unsolvable to being a walk in the park (Glad I got to use some interface tools this time!):
Need some trick on part2 to finish calculation.
Solved!
Today is straightforward, too.
Got hint from here. 😁
Took me longer than I wish to admit to figure out the trick to part two, and also just let it run in the blind hope it would be fine, knowing that it wouldn't be...Got there in the end!
Spent 10 minutes iterating with the same macro for Part 2, with my computer sounding like it was going to take off before I worked it out! Ran in 1.5 seconds for part 1 and 2. Spoilers ahead:
My workflow is not good...
Day 11 & another 2 stars down! Despite my defiance in the WhatsApp group, I did indeed end up optimising this in order to save my laptop.
It tool a while to find an overflow with Int32 in Part2.
As the difference is only the number of blinking, I put it to the parameter in the macro.😉
Day11 is easier.
Day 11. More in spoiler
Cool!
First part was really quickly, but second.... 🙄 I guess after 7 versions I have something that was working fast 😅
First Iterative macro
Second Iterative macro
Applied some quick simple logic for an iterative macro to get solution to part 1... then tried running this for part 2 and memory quickly became an issue after 30+ blinks and slowed WAY down... so I went back to the drawing board and realized the question had fooled me into thinking overall sequence mattered when really it only matters for the individual stone/number splits. Made a quick tweak to group by numbers as they will always be treated the same, and BAM whole thing runs in about a second. 11 down, 14 to go...
Got my hopes up when I saw the short question for the second star. Should have known! Tricks noted above in terms of realising you need to know the number of scenarios, not perform same task on each row, is key.Good opportunity for me to brush up on iterative macros as I simply don't use them on a daily basis.
Crazy Numbers - made me think of the Franck Muller Crazy Numbers timepieces - paid as tribute in the macro icon.
Fun challenge Tried to run part 2 without grouping at first but it almost killed my laptop
I knew there was a trick in Pt 2 but I had to look at @CoG 's for the hint/answer - thank you!
Pt 1:
Pt 2:
I just looked and found a misspelling of the field name.
11!
I knew brute force was going to burn me in Part 2, and I was right. This reminded me of the lanternfish from a couple of years ago, but it took me awhile to remember how I solved that one and apply it here.
Having a very strange experience with 3 separate challenges correct on first answer for each parts 1 & 2
Pt 2 took a bit to get to run.
Thankful for a small tweak to make it solvable!
Most of the heavy lifting done in the macro for this one.