advent_of_code
advent_of_code copied to clipboard
This repository contains solutions to each of the problems in Advent of Code 2016, 2017, 2018, 2019, 2020, 2021, 2022 and 2023 in C++ (and 2020 in Python as well)
Advent of Code
This repository contains solutions to the Advent of Code puzzles.
Current Status
| Year | C++ | Python | Link to folders | Link to README.md |
|---|---|---|---|---|
| 2023 | 1-25 | - | Link | Link |
| 2022 | 1-25 | - | Link | Link |
| 2021 | 1-25 | - | Link | Link |
| 2020 | 1-25 | 1-25 | Link | Link |
| 2019 | 1-25 | 1-7 | Link | Link |
| 2018 | 1-25 | - | Link | Link |
| 2017 | 1-25 | - | Link | Link |
To run
To run any day's/puzzle's solution, use the following command:
# To compile
# <clang++/g++> <year>/cpp/day_<##><a/b>.cpp -o <output file>
# To run
# ./<output file> <path to input file>
# ./<output file> <year>/<input/sample_input>/day_<##>_<input/sample_input>
# Sample
g++ 2017/cpp/day_01a.cpp -o a.out
./a.out 2017/input/day_01_input