view day21.txt @ 35:ca54f9702892

Day 24 part 2 instructions and partial solution
author IBBoard <dev@ibboard.co.uk>
date Thu, 18 Apr 2024 19:54:59 +0100
parents 6de4f4d5404d
children
line wrap: on
line source

--- Day 21: Step Counter ---

You are in a maze. `S` is your starting position. `.` is open. `#` is blocked. How many spaces can you get to in N steps?

e.g. for this map:

...........
.....###.#.
.###.##..#.
..#.#...#..
....#.#....
.##..S####.
.##..#...#.
.......##..
.##.#.####.
.##..##.##.
...........

You can be in any of 16 spaces after 6 steps.

...........
.....###.#.
.###.##.O#.
.O#O#O.O#..
O.O.#.#.O..
.##O.O####.
.##.O#O..#.
.O.O.O.##..
.##.#.####.
.##O.##.##.
...........

How many spaces are there after 64 steps?

-- Part 2 --

The map tiles infinitely and you need to take 26501365 steps. How many spaces can you reach now? And does anyone care?