https://github.com/jbaldwin/adventofcode
https://adventofcode.com
https://github.com/jbaldwin/adventofcode
advent-of-code
Last synced: 4 months ago
JSON representation
https://adventofcode.com
- Host: GitHub
- URL: https://github.com/jbaldwin/adventofcode
- Owner: jbaldwin
- License: mit
- Created: 2019-12-01T18:25:11.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2023-12-15T19:57:44.000Z (almost 2 years ago)
- Last Synced: 2025-06-21T05:41:26.600Z (6 months ago)
- Topics: advent-of-code
- Language: C++
- Homepage:
- Size: 932 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# adventofcode
https://adventofcode.com
## Cloning this repository
This project uses git submodules for some libraries on the C++ solutions, the Rust solutions use Cargo to properly build dependencies.
git clone --recurse-submodules https://github.com/jbaldwin/adventofcode.git
## Rust Solutions
Moving forward I am solving the Advent of Code problems using rust, I have not introduced a root makefile or build system yet to build all Rust and C++ solutions, so depending on the implementation you'll need to run both make systems to build everything. For Rust solutions simply use cargo to build and run the executables:
# Build the rust problem solutions
cargo build --release
# Run a specific problem with the following template:
cargo run --release --bin -- ///src/input.txt
# Example:
cargo run --release --bin aoc_2021_day01_p1 -- 2021/day01/p1/src/input.txt
## C++ Solutions
I originally started solving Advent of Code to hone my C++ skills, to build these problems use the following commands to build and run the problem solutions:
To build every solution availabile:
mkdir Release && cd Release
cmake -DCMAKE_BUILD_TYPE=Release ..
make
To run a solution from ./Release directory:
# This will output the required arguments, generally just the input.txt is needed.
./bin/_day_p
# The input files live in the source directory for the
# year/day/part, and most p2 parts just use p1 input.txt
./bin/2019_day18_p2 ../2019/day18/p1/input.txt