Day 23 solution

Part 2 takes 7 seconds on my macbook, which I'd like to improve, but this gets the answer.
This commit is contained in:
2022-12-23 13:31:50 -06:00
parent d63a49b131
commit a121992976
6 changed files with 234 additions and 5 deletions

View File

@ -1,5 +1,74 @@
#############
#...........#
###A#D#B#C###
#B#C#D#A#
#########
.##.#.#####..##.#.#...#.##....#.######.##.#.#.##..#.#.##.#.######.#.###.##
.#.#..#####....###.####.###..##.....#####..#.#####.##...#.##.#.##....####.
........##..#.###.#.#..#..#.######..#.##.#.#####.#..##...#.#.##...###.#...
.#..#....#.......#..#...##.#.##.#..##..#.###.######.#.#.#####....#...####.
##......##.####...##.###....##.#.####..###...#..#.#...#..#.##..###.#.####.
#...#..##.######.#...##...#.#........##...#.###..#.##..##.##...#######.##.
#....#.#..###...####.....#..##.##......#.....###.##.....#.####..##..#..#..
...##.#.##.#.#...##....#.#.###.###.##..#.##.###...#..#..##..#....#.##.##.#
#....#########.####..#....##.###.##.....###.#..##...##.#####.###..##.....#
###.######.###.#####..####.#....#.###..#..###.#.####.###..#.##...##.#..#..
.##....#..##..#....######.##..###.#.#.#...###...#.###.##.#....#.##.#.####.
.......##...##..#..####.##........##...##.#.###.#####.####.##...####.#....
###.#......#..#.#.#.####...#####.#.####.#.####....#.....#.######....##.##.
###...#.##.####..#..##.#.#.#...#.###..##..##.###....##.....##..#.##..#.#..
#########.#.####..##.#.#...##.##....####..#####..#....#.#...######.###....
#.##....###..####.#..#####.#..##.###....#.#.###..##.#....###.#.#.#.#..##..
##.###....###..##..###..#.#..##.#.##.#..#.......#.##.######.#...#...#.####
##.......#.....####...#...#.##.#..##.##........####..#.....#...##.#...#.##
.##..#.#....##.....##.##.#.#.###...##...#..####...#.#.#..######.#...##....
.#....##.#.#.#..#.#.#....#....###.##.###....#.....###.#...#.##..#..####..#
..##...##..###..#####.########.##....#.#...##.##..#.#.##...##..#...##.##.#
#.#...##....#...###....#...#.##.#.##.######.##...#####...##.##...#######..
.#.#.######.##..#.####.#.##.##.##.#...####......##.....##...####..##.####.
.###.###..##.....#####...####..##...##.##.##..##...#..#.#..##.....###.#.##
#.#.####.##.#.###.###.#..#.#....#######.###......#.##.....######.....##...
##..#.#.#..#....##.....#.###.#..##.....##############.#.#.####.##..#.##.##
#.....#.#..#.##..##..##..##...###....###..##.##...##.##....#..#######..##.
##.##..###.#..###.##.####.#.#.........##.#......#.###.#..##..#...##..#.##.
..#.###.##.####.####.#..#.###...#.#.###.#.##..#....#.#.#...#....###....###
#..#...##.#....###.#.###..#...###.##.#.######......#.##.#..#..#.###.######
#.#...#.##..#....###....#.#.#.....########.#..##...#.#..############.#####
..####.#....#####.#.#.#....#..#.##....#..#..###.####.#....##.##...#.#.##.#
.##...#.#..#.###..#...#..#.#.#....#..#.###.##.#.####.#.###..#..#.....##..#
###..#.##...#.###.###...##..#.####....#.####......#..###...#...#.#....#.##
...#.######...#.########..######...##.....###.####.#.###...#.###.###.#....
##.#####...###.##.#.####..#...#.#####.##.....#....####.#####.####.###..#.#
....###...#.#..#.##.#...#....#.#.#..##########.....#..##..##..##.##.##.#..
#....#..##.#...###..####.#......########.#.......###..#...##.#.#..#.....#.
....#.......###.##.##.###.#.####.#...##.#.#..#.#.#.#.....##.#.#...#.#.#.##
###.#.##..##..####.#####.#.##.###..#.#######.##...#.#####.##.##.###..#...#
####.#.#..#..##.##..#.#.##.#.###.#...#.#..##.######.#.###.#..#..####..#..#
#......#.###.#.##...##..##...#.#..#.#.###...#..##..##.###.#.#..#.####.#..#
.###.#.#.....#.#####.....#.#..#...#...####...#.####....#..#.#...#.#.#..###
##....######.#.....##.....#.###...#..###.#.##...##..#.###.....#..#..#.#...
##..#.#.##....#.#...##.##.##.##.#.#.##..#.#..#..##.##..##..#.##..#....##.#
#.##.#.#.###...######...##.#.#.##.#.#..#...#.###..##.##.#....#..#..#.#...#
..##...#....#.##.##..##...##.......#..#####...#.#...###..#.#.##...#..#....
#.#.....##.##.#.#.#...##.#....#...#.#.##..#.####.#.#.##..#.##.##.###....##
..#.##..#.#..##.#..##....###.##...#.##...#.#....##.###.#.#.##...##.##..#.#
.######.###........#.#.....#.#.......#.##.########.#...#.#..##.##.##..####
#..##.....##....###.###.#.#..##..##..#.#.#.##.#.....##.###.#.##.##.#.#...#
.......###..##.##.####.#.#####.#..#...#####...#...#..#.##.####..##.##..##.
##....#####.##....#..###.####.###.###..#.#.#..#.#.##..#..###.#########.#..
#.###..###...#.#..#.#...#.#.##.#.######.####..#..##..##.#......###.#..#...
.##..#####..#.#....###.###.##.....##..#.##....#..##.#...####...##.#.......
##.####..##...##.#...######.###.###.#.###..####.####.##..###.##.##..######
##.#.####.#.#..#.#.###.......###......####.#.#.##.#...##..##..##.....#.#.#
.###....####.#...#.#......#####.##.##.#...###..##...##...#####....##.#..##
#..###..##....#...##.###..##.##.##########..#..##...#....##....#.......##.
###.###..#.#..#....##.#......#.###.#.#.#.#.##...#..#..##......###.##..#.#.
....##......#......#....#.##.####.####.##.###.#.##.#..#.#.#..........#.#.#
#...####...#.###..##....##..##.#####.###.#...#..#.....##.#.###.##.#...#.##
.###..##.#.###.#....#..#.###.######.##.#####..#..#.#..##.#..######.##....#
.#....###..#.#.###....##.#...###.#.#...##.#.##.##.#.#.##.#.#...#.#........
..#.##...#....##.#..#.#.#.......#..#......#..#..#..#.#.##....#.#.#...###..
##.#.#..##.##.#....#.#...........###....#..##.##.######.##.##..####.#.....
..##...###....###.#####..###......###.#..##...##....##.#.#.###....#..##..#
.#....#.#.#.###..##.##.#....#.##.##....#.#.##..###..##...###.#...#....##..
#...#...####...####...#.#.#.#####....####..#..##.###.#.#....##...#.##..##.
###..#####..#.#.#...#.#.#...#...###.####.###..#...###.####.####..##.#..#..
#...#####...##..#.###.#.#.#.#..####..##......#####....#####.####.####...##
..........#..#..#..##.#.##...##...#..#.#...#####.....#####..#...##.##.#..#
.#.##.###...#.##.#....###.#.##.##.#.####.#..##.#..#..#.#.##........#.#####
.###########.##.###.#..#.###....#......#.##.....####.####..##.....#####.#.

7
inputs/23a.txt Normal file
View File

@ -0,0 +1,7 @@
....#..
..###.#
#...#.#
.#...##
#.###..
##.#.##
.#..#..

6
inputs/23b.txt Normal file
View File

@ -0,0 +1,6 @@
.....
..##.
..#..
.....
..##.
.....