2024-03 part1
2024-02 part2
2024-02 part1
Here are my Advent of Code solutions!
Please don't come here looking for clean code. I try to keep things reasonnably readable, but my actual production code looks better I swear :)
There is one folder for each year, one subfolder for each day and one file for each part of the day. There is also a lib/ folder for helpers files.
The input is expeted in an input.txt
file in the daily folder.
Here are some instructions for running the solutions in differennt languages.
To build the helper library:
cd lib/
gcc -c advlib.c
Then, to compile a given solution:
cd YYYY/DD
gcc -o part1 -I ../../lib part1.c ../../lib/advlib.o -lm
No library yet.
To run a specific solution:
hare run part1.ha
It's also possible to create the executable and run it separately:
$ hare build -o part1 part1.ha
$ ./part1
No library yet.
The version of Python I'm using will probably change from year to year. For 2024 it's 3.11.
python part1.py