Mercurial > repos > other > adventofcode2023
view day16.txt @ 28:5ba34a851816
Implement Day 19 workflows, skip part 2
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Wed, 03 Jan 2024 11:34:54 +0000 |
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.