diff --git a/.aoc_tiles/tiles/2026/05.png b/.aoc_tiles/tiles/2026/05.png index 42db858..00889b5 100644 Binary files a/.aoc_tiles/tiles/2026/05.png and b/.aoc_tiles/tiles/2026/05.png differ diff --git a/2026/src/day5.rs b/2026/src/day5.rs index adc9d97..b7094a3 100644 --- a/2026/src/day5.rs +++ b/2026/src/day5.rs @@ -1,8 +1,8 @@ use aoc_runner_derive::{aoc, aoc_generator}; -use itertools::Itertools; +use rustc_data_structures::fx::FxHashSet; use std::{ - collections::{HashMap, HashSet, VecDeque}, + collections::{HashMap, VecDeque}, fmt::Display, str::FromStr, }; @@ -66,7 +66,7 @@ impl Microwave { Button::Oct => format!("{:o}", self.displayed).parse().unwrap(), Button::Bksp => self.displayed / 10, }; - if displayed > Self::MAX_N { + if Self::MAX_N != 0 && displayed > Self::MAX_N { Self { displayed: self.displayed, } @@ -82,47 +82,68 @@ fn parse(input: &str) -> Vec