Home

Awesome

Advent of Code 2024 🎄🎁

This repo contains my solutions for different years.

Days, stars and solutions

Benchmarks are run on an "Intel i7-10700K @ 5.100Ghz CPU". Use the --release flag when benchmarking a day.

DaySolutionStarsParse benchmarkPart 1 benchmarkPart 2 benchmark
Day 1: Historian HysteriaHere⭐⭐63µ264ns50µs
Day 2: Red-Nosed ReportsHere⭐⭐142µs7µs57µs
Day 3: Mull It OverHere⭐⭐65µs345ns466ns
Day 4: Ceres SearchHere⭐⭐7µs1ms360µs
Day 5: Print QueueHere⭐⭐201µs395µs797µs
Day 6: Guard GallivantHere⭐⭐36µs251µs1s
Day 7: Bridge RepairHere⭐⭐455µs578µs84ms
Day 8: Resonant CollinearityHere⭐⭐21µs116µs92µs
Day 9: Disk FragmenterHere⭐⭐1ms520ms332ms
Day 10: Hoof ItHere⭐⭐65µs489µs436µs
Day 11: Plutonian PebblesHere⭐⭐1µs582µs32ms
Day 12: Garden GroupsHere⭐⭐221µs7ms11ms
Day 13: Claw ContraptionHere⭐⭐158µs3µs6µs
Day 14: Restroom RedoubtHere⭐⭐94µs180µs790ms
Day 15: Warehouse WoesHere⭐⭐210µs130µs3ms
Day 16: Reindeer MazeHere⭐⭐20µs3s6s
Day 17: Reindeer MazeHere532ns224ns-
Day 18: RAM RunHere⭐⭐255µs113µs257ms
Day 19: Linen LayoutHere⭐⭐64µs4ms30ms

Run it yourself

Run a day

While being at the 2024 directory:

cargo run -- [--day <day>] [--sample] [--bench <n>]

--day=<1-25> Optional (default:1). Specifies the day to execute the puzzle (1-25)

--sample: Optional (default: false). If set, the input file will be the sample.txt located in the inputs folder.

--bench=<n>: Optional (default: 0). If set, the puzzles will run n times, outputing only the average timings.

Example output

Output screenshot