From a6cf06b0453d6f51979ebc8a7c214a9f5158e084 Mon Sep 17 00:00:00 2001 From: mirsella Date: Tue, 19 Dec 2023 17:17:02 +0100 Subject: [PATCH] fix use in day19 --- 2023/day19/src/main.rs | 4 +--- 2023/day19/src/part1.rs | 2 ++ 2023/day19/src/part2.rs | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) 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,