From 58800a74af2c9f3578d3e62b3226aaf7c73aef87 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sun, 6 Jul 2025 09:48:32 +0200 Subject: Finally, part 2 for Day 19 2022 --- 2022/19/b.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 2022/19/b.rs (limited to '2022/19/b.rs') diff --git a/2022/19/b.rs b/2022/19/b.rs new file mode 100644 index 0000000..d97bf53 --- /dev/null +++ b/2022/19/b.rs @@ -0,0 +1,17 @@ +use std::collections::HashMap; +mod common; +use common::*; + +fn main() { + const MINUTES: i32 = 32; + let mut mem = HashMap::<(Status, i32), i64>::new(); + let mut prod = 1; + let bp = read_blueprints_from_stdin(); + for i in 0..3 { + let mg = most_geodes(&bp[i], &Status::new(), MINUTES, &mut mem); + println!("{i}: {mg}"); + prod *= mg; + mem.clear(); + } + println!("{prod}"); +} -- cgit v1.3