Welcome to my Advent of Code repository! This is where I document my journey through the Advent of Code challenges, year by year. Each directory corresponds to a specific year, containing the solutions to each day's puzzles.
To compile and run the solutions, follow these steps:
-
First, build the
build.cpp
file located in the root directory:$ g++ -std=c++11 -o build build.cpp
-
After building, you can run the specific solution using the following command to build and run the specified challenge:
$ ./build <year> <day> <part> [<input|test>] [<run>]
<year>
: A 4-digit number specifying the year (e.g., 2023).<day>
: A 2-digit number specifying the day (e.g., 24).<part>
: The part number, either 1 or 2.<input|test>
: Optional file type, "input" or "test". Defaults to "input".<run>
: Optional flag to run the compiled executable. If provided, the executable will be executed with the specified input or test file.
To benchmark solutions and analyze performance:
-
Build the
benchmark.cpp
file:$ g++ -std=c++11 -o benchmark benchmark.cpp
-
Run the benchmarking tool:
$ ./benchmark <year> <day> <part> [<input|test>] [<runs>]
<year>
: A 4-digit number specifying the year (e.g., 2023).<day>
: A 2-digit number specifying the day (e.g., 24).<part>
: The part number, either 1 or 2.<input|test>
: Optional file type, "input" or "test". Defaults to "input".<runs>
: Optional number of runs. Defaults to 1000.
This directory contains my solutions for the 2015 Advent of Code. It includes input files, C++ code for both parts of each day's puzzle, and the original prompts.
This directory contains my solutions for the 2023 Advent of Code. Each day's directory has the input files, C++ code for both parts of the puzzles, and the prompts.
This project is licensed under the MIT License. See the LICENSE file for more details.