π Feliz Navidad, Buon Natale, Merry Christmas
This repository contains my solutions for the Advent of Code challenges.
The repository is structured as follows:
-
Each solution in well contained in a folder with the following structure:
./src/<year>/day-<day>/part-<part>For instance: ./src/2023/day-01/part-1
-
Each solution folder contains the following files:
main.cpp: The solution code.in.txt: The input data from the challenge.out.txt: The solution output.submit.txt: The submitted answer to Advent of Code website.
-
Go to any solucion folder. For instance:
cd ./src/2023/day-01/part-1 -
Run the
main.cppfile, which is the solution:g++ -std=c++20 -o out ./main.cpp && ./out -
Check the output:
cat out.txt
There is a script that checks the solutions and compares the output with the submitted answer.
make checkExample Output
Checking ./src/2024/day-01/part-2/main.cpp
β
Check passed
Checking ./src/2024/day-01/part-1/main.cpp
β
Check passed
Checking ./src/2023/day-01/part-2/main.cpp
β
Check passed
Checking ./src/2023/day-01/part-1/main.cpp
β
Check passed
Checking ./src/2023/day-04/part-1/main.cpp
β
Check passed
Checking ./src/2023/day-03/part-2/main.cpp
β
Check passed
Checking ./src/2023/day-03/part-1/main.cpp
β
Check passed
Checking ./src/2023/day-02/part-2/main.cpp
β
Check passed
Checking ./src/2023/day-02/part-1/main.cpp
β
Check passed
It will walk through all the solutions and check if the output is correct.
Optionally, you can pass a specific folder:
make check 2023/day-01/part-1
