This repository contains my solutions to Advent of Code puzzles for the years 2015 and 2022-2024. Folders and input files exist for other years, but solutions are not yet implemented.
Please note: Input files are encrypted using git-crypt due to Advent of Code's policy against sharing puzzle inputs.
The code is written in C++ and uses g++ for compilation. A helper script named aochelpers.sh located in the root directory assists with building and deleting binaries.
Navigate to the folder for the day of interest and run:
../../aochelpers.sh build <part_number> # e.g., ../../aochelpers.sh build 1
This script assumes you are in a folder named D (e.g., D03) and builds the executable for the specified part (1 or 2) of the day's puzzle.
Solutions take input from standard input (stdin). You can pipe the contents of an input file like this:
cat input-d<day>.txt | ./d<day>p<part>
For example:
cat input-d01.txt | ./d01p1
This will execute the solution for day 1, part 1 in 2024, using the contents of input-d01.txt as input.
This project is open-source and licensed under the MIT License.