- commit
- 7a306ce03f2797d2085e4b3df0b2d7c51c18c9d8
- parent
- e7b58347219ac81c3dc2b21708d183a04ec3d702
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2023-12-16 11:49
perf
Diffstat
M | 2023/16/solution.rs | 6 | ++++++ |
1 files changed, 6 insertions, 0 deletions
diff --git a/2023/16/solution.rs b/2023/16/solution.rs
@@ -78,6 +78,9 @@ fn count(map: &Vec<Vec<Cell>>, start: (usize, usize, u8)) -> usize { 78 78 _ => unreachable!(), 79 79 }, 80 80 Cell::SplitHorizontal => { -1 81 if visited[y][x] != 0 { -1 82 continue; -1 83 } 81 84 match dir { 82 85 RIGHT => push(&map, &mut queue, x, y, dir), 83 86 LEFT => push(&map, &mut queue, x, y, dir), @@ -89,6 +92,9 @@ fn count(map: &Vec<Vec<Cell>>, start: (usize, usize, u8)) -> usize { 89 92 }; 90 93 }, 91 94 Cell::SplitVertical => { -1 95 if visited[y][x] != 0 { -1 96 continue; -1 97 } 92 98 match dir { 93 99 UP => push(&map, &mut queue, x, y, dir), 94 100 DOWN => push(&map, &mut queue, x, y, dir),