Day 23, part 2

This commit is contained in:
jazzpi 2022-12-24 14:08:01 +01:00
parent 7abd632567
commit 98fcdfeaef
1 changed files with 20 additions and 0 deletions

20
src/bin/d23p2.rs Normal file
View File

@ -0,0 +1,20 @@
use aoc22::{
day23::{self},
util,
};
pub fn main() {
let mut elves = day23::parse_map(&util::parse_input());
let mut i = 0;
loop {
let elves_too_close = day23::do_round(&mut elves, i);
i += 1;
if !elves_too_close {
break;
}
}
println!("First idle round: {}", i);
}