This is my repository for Advent of Code 2022. I wanted to participate to train my algorthmics and learn C++20 features in practice.
This is a competition held every year during the Advent, available on https://adventofcode.com/
Advent of Code is an Advent calendar of small programming puzzles for a variety of skill sets and skill levels that can be solved in any programming language you like.
- C++20
- GCC 11.0
- Boost
- Navigate to project folder
- Create build folder
mkdir _build
- Create "inputs" folder
mkdir inputs
- Navigate to build folder
cd _build
- Run cmake
cmake ..
- Make project
make
In main function you can create a class associated to specific day during the competition. After creation you can pass it down to a helper function called "checkResults()" with corresponding input file name. Remember to download input file and put it in inputs folder.
For task five it should look like this:
- in main.cpp:
int main() {
TaskFive task;
checkResults(task, "inputs/taskFive.txt");
}
Example output for example given in previous section:
Task path is "/mnt/c/projects/AdventOfCode/inputs/taskFive.txt"
For my first star result is: ZWHVFWQWW
Task path is "/mnt/c/projects/AdventOfCode/inputs/taskFive.txt"
For my second star result is: HZFZCCWWV