Personal solutions for the Advent of Code challenges, organized by year and executed through a single runner binary.
The binary accepts two parameters:
| Flag | Meaning | Example |
|---|---|---|
--year, -y |
Target Advent of Code year | -y 2024 |
--day, -d |
Target day (1–25). Accepts 1 or 01 |
-d 1 |
Internally, days are formatted as two digits, so both 1 and 01 work.
Arguments to your binary must come after --:
cargo run -- -y 2024 -d 1Run Day 01 – Year 2024:
cargo run -- -y 2024 -d 1Build in release mode:
cargo build --releaseExecute the binary:
./target/release/advent-of-code -y 2024 -d 1Puzzle inputs must follow this layout:
inputs/y{year}/{day}.txt
Where:
| Component | Description | Example |
|---|---|---|
{year} |
Four-digit year | y2024 |
{day} |
Day in one or two digits | 01 or 1 |
Example:
inputs/y2024/01.txt
or
inputs/y2024/1.txt