diff --git a/rust/2023/README.md b/rust/2023/README.md index 6012455..47ee74c 100644 --- a/rust/2023/README.md +++ b/rust/2023/README.md @@ -31,6 +31,7 @@ You try to ask why they can't just use a weather machine ("not powerful enough") | [Day 13: Point of Incidence](https://github.com/believer/advent-of-code/blob/master/rust/2023/src/day_13.rs) | 🌟 | 27300 | 🌟 | 29276 | | [Day 14: Parabolic Reflector Dish](https://github.com/believer/advent-of-code/blob/master/rust/2023/src/day_14.rs) | 🌟 | 108614 | 🌟 | 96447 | | [Day 15: Lens Library](https://github.com/believer/advent-of-code/blob/master/rust/2023/src/day_15.rs) | 🌟 | 516070 | 🌟 | 244981 | +| [Day 16: The Floor Will Be Lava](https://github.com/believer/advent-of-code/blob/master/rust/2023/src/day_16.rs) | 🌟 | 7562 | 🌟 | 7793 | ## Performance @@ -53,6 +54,7 @@ With the help of [cargo-aoc](https://github.com/gobanos/cargo-aoc) I get automat | 13 | 24.87 µs | 17.61 µs | | 169.28 µs | | 14 | 19.30 µs | 20.22 µs | | 23.69 µs | | 15 | 19.99 µs | 210.88 µs | - / `-28.20%` | 241.12 µs | +| 16 | 1.41 ms | 49.39 ms | | 30.33 µs | \* compared to first solution
\*\* slow, didn't benchmark. Value comes from running the solver. diff --git a/rust/2023/src/day_16.rs b/rust/2023/src/day_16.rs index 39891b5..29cc9ef 100644 --- a/rust/2023/src/day_16.rs +++ b/rust/2023/src/day_16.rs @@ -1,5 +1,9 @@ -//! Day 16 - +//! Day 16: The Floor Will Be Lava +//! +//! Another day, another grid. This time, we'll direct a beam of light +//! through a grid of mirrors and splitters. The goal is to find the number of +//! energized tiles, tiles where the beam has been. I enjoyed this one. +//! Just the right amount of challenge. Not too easy, not too hard. use rayon::iter::{IntoParallelRefIterator, ParallelIterator}; use std::collections::{HashSet, VecDeque}; @@ -92,7 +96,8 @@ pub fn input_generator(input: &str) -> Input { /* Part One * -* +* Find the number of energized tiles after firing the beam from the top left +* of the grid. */ // Your puzzle answer was #[doc = r#"``` @@ -107,6 +112,8 @@ pub fn solve_part_01(input: &Input) -> usize { /* Part Two * +* Find the maximum number of energized tiles after firing the beam +* inwards from all edges of the grid. * */ #[doc = r#"```