Skip to content

Commit

Permalink
fix use in day19
Browse files Browse the repository at this point in the history
  • Loading branch information
mirsella committed Dec 19, 2023
1 parent 2b08a7b commit a6cf06b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 1 addition & 3 deletions 2023/day19/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
use std::array;
mod types;
use types::*;
mod part1;
mod part2;
mod types;
use part1::part1;
use part2::part2;

Expand Down
2 changes: 2 additions & 0 deletions 2023/day19/src/part1.rs
Original file line number Diff line number Diff line change
@@ -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::<Vec<_>>();
Expand Down
4 changes: 4 additions & 0 deletions 2023/day19/src/part2.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
use std::array;

use crate::types::Flow;

fn count_accepted(flows: &[Flow], current: &str, mut ranges: [Vec<usize>; 4]) -> usize {
match current {
"R" => return 0,
Expand Down

0 comments on commit a6cf06b

Please sign in to comment.