Mercurial > repos > other > adventofcode2023
view day16.txt @ 36:7197f31970ff
Day 25 part 1 instructions and partial solution
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Thu, 18 Apr 2024 19:56:23 +0100 |
parents | ad73a2ff3d06 |
children |
line wrap: on
line source
--- Day 16: The Floor Will Be Lava --- A laser/mirror problem - "/" and "\" are mirrors that reflect 90°. "-" and "|" are splitters - transparent in the same orientation, but TWO beams go at 90° if hit against the flat edge. "." is empty space. The laser starts in the top-right. For an example map: .|...\.... |.-.\..... .....|-... ........|. .......... .........\ ..../.\\.. .-.-/..|.. .|....-|.\ ..//.|.... The laser goes: >|<<<\.... |v-.\^.... .v...|->>> .v...v^.|. .v...v^... .v...v^..\ .v../2\\.. <->-/vv|.. .|<<<2-|.\ .v//.|.v.. Every space that the laser goes through is "energised", which gives: ######.... .#...#.... .#...##### .#...##... .#...##... .#...##... .#..####.. ########.. .#######.. .#...#.#.. The count of energised spaces is 46.