Day 11, puzzle 2

This commit is contained in:
jazzpi
2022-12-15 21:34:16 +01:00
parent 4f5d6d7fa0
commit 876ebfcfe3
5 changed files with 178 additions and 13 deletions

22
src/bin/d11p2.rs Normal file
View File

@ -0,0 +1,22 @@
use aoc22::{
day11::{self, monkey_business},
util,
};
const N_ROUNDS: usize = 10000;
pub fn main() {
env_logger::init();
let monkeys = day11::parse_monkeys(&util::parse_input());
for _ in 0..N_ROUNDS {
day11::do_round(&monkeys, false);
}
println!(
"Monkey business after {} rounds is {}",
N_ROUNDS,
monkey_business(&monkeys)
);
}