aoc

My solutions for the Advent of Code
git clone https://git.tronto.net/aoc
Download | Log | Files | Refs | README

b.rs (418B)


      1 use std::collections::HashMap;
      2 mod common;
      3 use common::*;
      4 
      5 fn 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 }