diff --git a/2023/day19/src/main.rs b/2023/day19/src/main.rs index 8aa1a61..2c77451 100644 --- a/2023/day19/src/main.rs +++ b/2023/day19/src/main.rs @@ -1,8 +1,6 @@ -use std::array; -mod types; -use types::*; mod part1; mod part2; +mod types; use part1::part1; use part2::part2; diff --git a/2023/day19/src/part1.rs b/2023/day19/src/part1.rs index e6dae31..7193c38 100644 --- a/2023/day19/src/part1.rs +++ b/2023/day19/src/part1.rs @@ -1,3 +1,5 @@ +use crate::types::{Action, Flow, Part}; + pub fn part1(input: &str) -> usize { let s = input.split_once("\n\n").unwrap(); let flows = s.0.lines().map(Flow::new).collect::>(); diff --git a/2023/day19/src/part2.rs b/2023/day19/src/part2.rs index 05db789..4e0b846 100644 --- a/2023/day19/src/part2.rs +++ b/2023/day19/src/part2.rs @@ -1,3 +1,7 @@ +use std::array; + +use crate::types::Flow; + fn count_accepted(flows: &[Flow], current: &str, mut ranges: [Vec; 4]) -> usize { match current { "R" => return 0,