aboutsummaryrefslogtreecommitdiff
path: root/2022/19/b.rs
blob: d97bf53c7a80cf6902180d19fc672f70d3313b75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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}");
}

Generated with cgit - Back to sebastiano.tronto.net