aboutsummaryrefslogtreecommitdiff
path: root/2022/19/b.rs
diff options
context:
space:
mode:
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