π Advent of Code 2022
Solutions for Advent of Code in Rust. Based on the project starter template by Felix SpΓΆttel.
2022 Results
Day | Part 1 | Part 2 |
---|---|---|
Day 1 | β | β |
Day 2 | β | β |
Day 3 | β | β |
Day 4 | β | β |
Day 5 | β | β |
Day 6 | β | β |
Day 7 | β | β |
Day 8 | β | β |
Day 9 | β | β |
Day 10 | β | β |
Day 11 | β | β |
Day 12 | β | β |
Day 13 | β | β |
Day 14 | β | β |
Day 15 | β | β |
Day 18 | β | β |
Day 20 | β | β |
Day 21 | β | β |
Day 25 | β |
Usage
Run solutions for a day
# example: `cargo solve 01`
cargo solve <day>
# output:
# Running `target/debug/01`
# π Part 1 π
#
# 6 (elapsed: 37.03Β΅s)
#
# π Part 2 π
#
# 9 (elapsed: 33.18Β΅s)
solve
is an alias for cargo run --bin
. To run an optimized version for benchmarking, append the --release
flag.
Displayed timings show the raw execution time of your solution without overhead (e.g. file reads).
Run all solutions
cargo all
# output:
# Running `target/release/advent_of_code`
# ----------
# | Day 01 |
# ----------
# π Part 1 π
#
# 0 (elapsed: 170.00Β΅s)
#
# π Part 2 π
#
# 0 (elapsed: 30.00Β΅s)
# <...other days...>
# Total: 0.20ms
all
is an alias for cargo run
. To run an optimized version for benchmarking, use the --release
flag.
Total timing is computed from individual solution timings and excludes as much overhead as possible.
Run all solutions against the example input
cargo test