this year I am going to try to have fun. :)
reverse lookup (by language / method)
Day 1 | Day 2 | Day 3 | Day 4 | Day 5
Day 6 | Day 7 | Day 8 | Day 9 | Day 10
Day 11 | Day 12 | Day 13 | Day 14 | Day 15
Day 16 | Day 17 | Day 18 | Day 19 | Day 20
Day 21 | Day 22 | Day 23 | Day 24 | Day 25
python with some arithmetic in brainfuck
brainfuck "sum chunks" for part 1
by hand in google docs/calculator
in godot: pass the left half and right half of the background through each other, increasing the score whenever a collision happens. make a big explosion upon collision to remove duplicates
in python, code golfed to 95 bytes (loads a file called "3" in the same directory; there's a setup batch script to copy that from the inputs folder)
work in progress: python + brainfuck
todo
by hand with pen + paper
python (writing to/querying the filesystem, of course; only tested on windows)
wip...
in (the rather nice, I think?) noulith language by betaveros, the Advent of Code (current) #1 ranked user. their webpage / their github
part 2 which does act as a generalization of part 1, but also has slightly less clean code
in python and very boring, although at least I define sensible classes? python code
in python and C++ via cppyy, which lets you create runtime python / C++ bindings.
the python file does most of the work: parse the input, run the rounds, and define the logic for the monkeys that multiply worry level (MultMultMonkey
s). the logic for the monkeys that add to worry level are implemented in the C++ file.
by hand with pen + paper
the right/finish section is navigating up a spiral of all letters, and I did this first, to get to d/e -- there is only one d/e area you can get to. I did this first, and it tells you where you have to aim for. the left/start section is just navagating a sea of c's; you can never drop into an a-hole because there are no b's to get back out. the route is super simple once you block off all the a's (ignore the part where I made a mistake...).
I had an off-by-two error which I fixed by going via z at the end, although the problem statement says that's the same elevation as the end point... I'm not sure how else I managed to create a shorter route :/
the second part is very easy. you only have to pick the optimal starting "a" point from the far left column, since there are no b's other than in the second column. you can then read off how many vertical steps you skipped by comparing to the start point and subtract that from the part 1 answer.
just plain python. trying to make it look easy since python almost solves this question out of the box, just not quite... python code
by hand on pen + paper, using a spreadsheet for the actual value calculations
first draw out all of the valves and tunnels...
then find the links between the valves you actually care about (ones with flow rate > 0; the majority of valves are flow rate 0 and just act as intermediate points)...
redraw just the nonzero flow rate valves (and distances) on a new page, highlight the 20+ and 10+ flow rate valves, scribble some candidate paths...
at this point there were three obvious candidate paths: two ways of rushing straight to a long chain of high values, and another way which gets a couple of very high values quickly but requires doubling back on yourself. I calculated the resulting score for these three paths with a spreadsheet:
days by language / method / etc
- day 3 part 2 95 bytes
this is the language noulith written by betaveros, the Advent of Code (current) #1 ranked user. their webpage / their github
- day 2 in google docs (+google calculator)