aboutsummaryrefslogtreecommitdiff
path: root/2022/19/b.rs
diff options
context:
space:
mode:
authorSebastiano Tronto <sebastiano@tronto.net>2025-07-06 09:48:32 +0200
committerSebastiano Tronto <sebastiano@tronto.net>2025-07-06 09:48:32 +0200
commit58800a74af2c9f3578d3e62b3226aaf7c73aef87 (patch)
treea34e75378d99a16196fc95fb23e2d5d80f22e1bb /2022/19/b.rs
parent950d82569ddf137f1674095bfbe6bfff8fce663f (diff)
downloadaoc-58800a74af2c9f3578d3e62b3226aaf7c73aef87.tar.gz
aoc-58800a74af2c9f3578d3e62b3226aaf7c73aef87.zip
Finally, part 2 for Day 19 2022
Diffstat (limited to '2022/19/b.rs')
-rw-r--r--2022/19/b.rs17
1 files changed, 17 insertions, 0 deletions
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 @@
1use std::collections::HashMap;
2mod common;
3use common::*;
4
5fn main() {
6 const MINUTES: i32 = 32;
7 let mut mem = HashMap::<(Status, i32), i64>::new();
8 let mut prod = 1;
9 let bp = read_blueprints_from_stdin();
10 for i in 0..3 {
11 let mg = most_geodes(&bp[i], &Status::new(), MINUTES, &mut mem);
12 println!("{i}: {mg}");
13 prod *= mg;
14 mem.clear();
15 }
16 println!("{prod}");
17}

Generated with cgit - Back to sebastiano.tronto.net