From 7bf835493316bfe9962c366546abf24ceb18f239 Mon Sep 17 00:00:00 2001 From: Maciej Jur Date: Sun, 11 Dec 2022 13:08:19 +0100 Subject: [PATCH] 2022 rust day 11 --- 2022/rust/src/solutions/day11.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/2022/rust/src/solutions/day11.rs b/2022/rust/src/solutions/day11.rs index c94eb9a..40b37aa 100644 --- a/2022/rust/src/solutions/day11.rs +++ b/2022/rust/src/solutions/day11.rs @@ -35,10 +35,6 @@ fn transfer_items(source: &mut VecDeque, destination: &mut VecDeque) { } } -fn simplify_factor(n: i64) -> i64 { - n -} - fn find_inspects(data: &Vec, rounds: i32) -> BinaryHeap { let mut monkeys: Vec> = data.iter().map(|m| m.items.iter().copied().collect()).collect(); let mut inspections: HashMap = HashMap::new(); @@ -73,6 +69,7 @@ fn solve1(data: &Vec) -> i64 { heap.pop().unwrap() * heap.pop().unwrap() } +// brb, speedrunning modular arithmetic course to solve this puzzle fn solve2(data: &Vec) -> i64 { let mut heap = find_inspects(&data, 10000); heap.pop().unwrap() * heap.pop().unwrap()