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KKGGGGQQQQQQQQQQGGGGGGGGXXXXXXXXXXXCQQQQQQQOQ
KJJJJJJJJJJSSSSSSSSSSHHHHHHHHHHHHHHHXXXXXXBBBBBBBBAAAAAEEEEEEEEOOOCCCCCCCCCCCCPPPPPPPKKKKKKKKKKKKGGGGQQQQQQQQQQGGGGGGGGGXXXXXXXXXYQQQQQQQQQU
KJJJJJJJJJJSSOOSSSSSSAHHHHHHHHHHHHHHHXXXXXBBBBBBBAAAAAAEEEEEEEEOOOCCCCCCCCCCCPPPPPPPPPKKKKKKKKKKKGGGGQQQQQQQQQQGGGGGGGXXXXXXXXXXXYQQQQQQQQQU

1279
inputs/13.txt Normal file

File diff suppressed because it is too large Load Diff

71
inputs/15.txt Normal file
View File

@ -0,0 +1,71 @@
##################################################
##.#...OO#O...O.O..#.#O.............O...O.O.O.OO.#
#O#O.....O...O..O#OO..O..OO....OO........#..#....#
#..O.O.O...OOO..O..#.#..O.OOO....O.....OO#.O#.#.O#
#.....#....O.O..#.#.O...OOO..#...O...O....OO.....#
#O.O#.....O....O#.O..OO.O...#O.........O...O.O.OO#
#..O..#OO.........O.#...O....O..OOOOO.O....O..O.##
##O#....OOO......#O#.#.##O..O...O.O.OOO#.........#
#O....O...O...O#OO.........O.........O.O.......O##
#......OOO...OOO.O........OOOO.....O..O.O......O.#
#.O....O#...#O.O.OOO...O...O..O...#OO.........O..#
#....#O..O.O#.............O...O#.O.#.O....#......#
##..O..O.OOO.O...................O#...O.....#...O#
#....O.O........O.O.#O.OO...O....O.....OO....O...#
#O...O.O....OOOO.O..#..O..O.#....OOOO#.....OOO.#.#
#...#O.........O......OO..O.O..#...OO#.##.#...OO##
#...O...OO.#...O....#..O...........#.......O#.O..#
#....OO.......O...##.#...O..O.O..#..O.....O.O.O..#
#..O.O...O....O..O....O.O..O.O.O.......OO.....O.##
#O..O.........O.......O.O.O..O#.OO.O.O.OO......#.#
#OO.O..OOO.....OO.#..#....OO..O.#.#.O..O.O.O.O.#.#
#..O...O.....OO..#..O...#....O..OO.#O.O...O.O..OO#
#.....#OO.O...O...#O..#..OO...O..#OO...........OO#
#..#O...O..#.O...O#.....#O.OOOOOO...#.O.O.O.O..O.#
#O......##.O..O........#@.....O..O#......O..OO...#
#......OOO..O.......#.....OO##...O.#O...#.O..O...#
#...O..O.....OO.O.#O.#..O.....O.O...#....O..O....#
#O....O.O..O..O..O..O..O..#...O.O.....O#.O.#.#OO##
#.O.....OO...OO#........OO....O...O....#........O#
#.#.....OO..O.O.#O#.##.O..#O#................OO.##
#.........O#OO.O.....#..#...O#O....O.O..O..O.....#
#OO....OOO.....O.............#OO#...#....#.O.....#
#.O#.....O#...#.O..O...O...#.OO..O...OOO#..#....O#
#.#.O.O..O......#...OOO.......##.O..OOO#.O.O.....#
#.........#.......#..O.OO.#.OO..O..O.....OOO..O..#
#..#...O#O...............OO.O.O.O..O..OO.....#.#.#
#O#.O.O.#.O..O#...O..O....O....OO#O.O.OOO.#..O...#
#...#.##........OO.O.O..O.....O.O#OO..O.O.O.##O..#
#O#...##.#...OO.OO.#O..O..#OO..O.O......O.O......#
#.OO....#.O...O........OO..O.......O.O#..O.......#
#O..O..O...O...O......OO..O..O.OOO.#...O....#O...#
#.....#...#...OO.O...O.#..#..#OO..........O.O.#O.#
#....O......O#.O.O...#...O..O.O.....O.O..O.....OO#
#..O...#.O..O.O...O......#.#OOO..................#
#.O.....OO.O...OO.......O.#...#...O....O.....O...#
#O##O.#..OOO...#......O..O..#OO.........O..O...OO#
#..O.O...O....O..O....#O.......O......O..OOOO##.O#
#..O.#O..O.OOO..#O.......O.#.#OO.O.O.O.O..O.#..#.#
#.....O.OOO...#.O.O..O...O.OO...OOO..#.O.O.OO.OOO#
##################################################
<v><v><><vv>v<v<^>><><>v^v>v>v<>^v<<>>v>>v>v^><>><v^v><v>v^v>v<^vv>vv><>v^^v>>v>^>>^v<v<^<v^^^<<<<v>>vvv<v<vv^><<>>^>v^^v>v^v>>^vv<^>^v>>^^>>>>v<<>^v>^^><^v>^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v^<^><v><<^^><>>><<>^<v^^vv>><<^v><><v<vv><v<<><><vvv^<^^<^><<^<<^<><><>vv<>>^>^^vvv<v^v<<v<><<>^^^^vv<><>^<><v>^<>>>v^v<>^><<<<^<^>^<>vv<>^<v^v<>>><vv>v^<^<><<^>vv^v>v>^>>>^vv<><^>>>>>^^<>^>^^>^^>>vv>v>vv^^v<><v^<^><^<<>v>^<><^v<<><^v><><>^^<^^v^>^^>v^<><><^>v><^><<^vv<<<>^v^<<^^<^<><^<>^<><v<v<^<^<vvv>>><<<v^v^>vv<^>v><<><<^<^v>vv^<>^^v>v^>^<<>v><^<><<v<v><>>^>>v>v>^>v<>^<<v^vvvv>
^^^<><vv<><<<vv<^v>v>>v><><v>><<<v^^vv<><^v><>vv^<^><<<^v>>vv>v<>v<><>>>^^v>>vv<^^<<<v>^^^>v<<>^v^^<<^>^v^<<<<^^>>vv><>>^<v^^v^<<><>>>v>^<v><vv><<v<>^>^<<^v^<>^>vvvv>>>>^><^vv>>^<<^>v^<^^>vv^^>v<<>^<>>v<<^<vvv<^^^><>v>>>^><^^<^><^^<>^>v<>>><<<v^v^vvvvvv^<<^v>><<^><>>v<^<v^<^<>>><v<>vv^><v><^^>v<^vv><><<^<<vv^v>v^><v>^^v<^<v<v^vv>>^^<<<<vvvvvv^>v<>><v>>>^<<^^<v>>^<<v^><><>vv<v^^^<^><>^v^<v^vv^vv>><<^><><v^>^v>^v<v<>^v^v>v>^^v><<>v<<<<>v>v>^<><<><><>v<v^^>^vv>vv><<><<><v<v>^^^^^vv><vvv<><><>><<<>>^>^v>^^<^v^^^>v^><v><><<^<v>^><>vv>vv<^^v<^><^><^<v^<>^<>v^vv<v^v>^>v^^>^^>><>^>>>vv<^^^<<<>v^><<^v><>v><<vv^^><vv^<^><<>>>^^><v<v><<<vv^v><>v><<^<^<v<v^<^<vv<>>><><v^>vv<<v^<vv><v^<><>^v^><><<<v<^^^>v<<vv<<^>>>^^v><>>>vv>><vvv^vv^><<<^v^^^vv<<<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^^v^<<>>v>v^>^<<v^>^><<^v<>>v>^^<<<>^>vv<^^v<>>^<><<<v^v<v>><>^<>>v<^v^<<<<>>>><v>^>vv<v>>^^>v^v><^v<v^><>^<<>v^<^<^<v<><>v<>^v>v>v>^v^^<<<><v^v><<>>v><>v<>^vv<v<vvv^^<<>^<^v

142
inputs/16.txt Normal file
View File

@ -0,0 +1,142 @@
#############################################################################################################################################
#.#...................#.........#...............#...#...........#...........#.....#.............#...............................#.#........E#
#.#.#.###############.###.#####.###.###.#######.#.#.#####.#####.#######.#.#.#.###.#############.#.#####.#.#####.#####.#.#######.#.#.#.#######
#...#.........#...#...#...#...#...#.#...#...#...#.#.....#.#...#...#.......#.#...#...#.........#.....#.#...#.....#...#.#...#.#...#...#...#...#
#.###########.###.#.###.###.#####.###.###.#.#.###.###.#.#.#.#####.#.###.###.###.###.#.#######.#####.#.#####.#######.#.###.#.#.#########.#.#.#
#...#.#.....#...#...#...#.#...........#...#.#.#...#.......#.....#.#.#.......#...#.....#.#...#...#.#...#...#.......#.#...#.#...#...#...#.#.#.#
###.#.#.#.#####.#.#####.#.#.#########.#.###.#.###.#.#.#####.#.###.#.#######.#.#########.#.#.###.#.###.#.#.#######.#.###.#.#.###.#.#.#.#.#.#.#
#.#.#.#.#.......................#.....#...#.#.#...#.#...#.#.#.....#.#.....#...#...#.......#.....#.....#.#...............#.#...#.#.#.#...#.#.#
#.#.#.#.#.#.#.#.###.#.###.###.#.###.#.###.#.#.#.###.#.#.#.#.#######.#.###.#####.#.#####.###########.#####.#.#####.###.#.#.###.#.#.#.#####.#.#
#.#.#...#...#.#...#...#...#...#...#.#.....#.#.#...#.#...............#.#.#.......#.....#.#.#.......#.......#.#.....#...#.#...#...#.#.......#.#
#.#.#########.###.#####.###.#####.###.#####.#.###.#.#.#.#####.#.###.#.#.#############.#.#.#.###.#.###########.#####.#.#.#.#.#####.#######.#.#
#.#.......#.....#...#...#...#...#.....#.#...#...#.#.#.#.....#.#...#.#...#...#.......#.#.#...#...#.............#.....#.#.#.#.#...#...#...#.#.#
#.#######.#.###.###.###.#.#####.#####.#.#.#####.#.###.#####.#.###.#####.#.#.#.#####.#.#.#####.#.#####.#########.#######.###.#.#.###.#.#.###.#
#.....#.#...#.#...#...#.#.#.......#.....#.#.#...#...............................#...............#...#.#...#.....#.......#...#.#.....#.#.....#
#.#.#.#.#####.###.###.###.###.###.#.#.###.#.#.#######.###.#.###.#.#.#.###.#.#####.###.#####.#.###.#.###.#.#.#.###.###.###.#######.###.#####.#
#.#.#...........#...#.....#...#.....#.....#...#.............#.#.#...#.#.....#...#.#...#.......#...#.....#.#.#.#...#...#...#.....#.....#...#.#
###.#############.#.#######.#.#####.#.#######.#.#############.#.#.###.#.#####.#.#.#.###########.#########.#.###.###.#.###.#.###.#######.###.#
#...#.......#.....#.#.......#.#...#.#.......#.#.#.......#.....#...#...#.......#.#.#.#.....#.....#.........#.#...#...#...#.....#...#.....#...#
#.###.#####.#.#.###.#.###.#####.#.#########.#.#.###.#.###.#.#.###.#############.#.#.#.#.#.#.#####.#########.#.#####.###.#.#######.#.#####.###
#...#...#.#...#.......#...#.....#.#...#.....#.#...#.#.#...#.......#...........#.#.#...#...#.....#.#.........#...#...#.#.#.#.....#.#.........#
#.#.###.#.###############.#.#####.#.#.#.#####.###.###.#.###########.###.#####.#.#.#####.#.#####.#.#######.#.###.#.###.#.#.#.###.#.#.###.#.#.#
#.#...#...........#.....#.#.#...#.#.#...#...#...#...#.#.#.....#...#.#.#.#.....#.....#...#.#.#...#...#...#.....#...#.#...#.#.#.#...#.#...#.#.#
#.#.#.#.#######.###.###.###.#.#.#.#.#####.#####.#.#.#.#.#.###.###.#.#.#.#####.#####.#.###.#.#.#####.#.#.#####.#####.#.#####.#.#####.#.###.#.#
#.#.#.........#.#...#.#.....#.....#...#.#.......#.#.#.#.#...#...#.#...#.....#.#.....#.#...#.#.#...#.....#.......#...#.#.....#...#...#.....#.#
#.#.#.#########.#.###.#######.#######.#.#.#.#######.#.#.#.#.###.#.#.#.#####.###.#####.#.###.#.#.#.#####.#.#####.###.#.#.#######.#.#########.#
#.#...#.........#.#...#.....#.........#.#...#.......#.#...#...#.#...#.#...#.....#...#.#.#...#.#.#...#...#.#.........#...#.......#...#.....#.#
#.###.#.###.#####.#.#.#.#.#####.#.#####.###.#.#######.#####.#.#.#.###.#.#########.#.#.#.###.#.#.#####.###.#########.#######.#######.###.#.#.#
#...#...#...#...#.#.#.#.#...#...#.#.#.....#.#.#...........#.#...#.#...#.....#...#.#.#.#.....#.#...#.....#...#.....#.#.......#.....#...#.#...#
###.#.###.#.#.#.#.###.#.###.#.###.#.#.#.###.#.###.#.#####.#.#####.#.###.#.#.#.#.#.###.#####.#.###.#.###.#.#.#.###.#.###.###.#.###.###.#.###.#
#...#.....#...#.#...#.......#.....#...#.#.....#...#.#...#.#.#...#.#...#.#.#...#.#...#.....#.#.#.....#.....#...#...#...#.#...#.............#.#
#.###.#####.###.###.#.#.###.#.#######.#.#.#####.#.###.#.#.#.#.#.#.###.#.#.#####.###.#####.#.#.#.###.#.#.#######.#####.#.#.#####.#.#.###.#.#.#
#...#.....#...#.#...#...#...#.#.......#...#...#.#.#...#.#.#...#.....#.#.#.#.#...#...#...#.#.#.#...#.#.........#.#...#...#.#.#...#...#...#...#
###.#.###.#.#.###.#######.###.#.#####.#####.#.#.###.###.###.#.#####.#.###.#.#.#.#.#.#.#.#.#.#.#.#.#.#########.#.#.#.#####.#.#.#######.#.###.#
#.#.......#.#.....#.....#.#...#.....#.......#.#...#.#.#.......#.....#.....#.#...#.#...#.#.#.#.#.#.#...#.#...#.#...#.........#.....#...#.....#
#.###.#.###.#####.#.###.#.#.###.###.#########.#.#.#.#.#########.###########.###.#.#####.#.#.#.#.#.#.#.#.#.#.#.#######.#####.#####.###.#.#.#.#
#.......#...#...#.#.#.#.#.#.#.#...#.....#.....#.#.#.#.......#.......#...........#.....#.#.#.#.#.#.#...#.#.#...#...#...#...#.....#...#.......#
#.#.#.#.#.#.#.#.###.#.#.#.#.#.###.#.###.#.#######.#.#.#.###.#########.#########.#####.###.#.#.###.#.###.#.#######.#.###.#.#####.###.###.###.#
#...#.#.#.....#.#...#.#.#.....#...#.#...#.#.#.........#.#.#.......#...#.......#.....#.#...#.#.....#...#...#.......#...#.#.........#.........#
#.###.#.###.#.#.#.###.#.#.###.#.#####.#.#.#.#.#.#####.#.#.#.#.###.#.###.#####.#####.#.#.#######.#####.#.#.###.###.###.#.#####.###.#####.###.#
#.#...#.#.....#...#...#.#.....#.#.....#.#.#...#.#.....#...#...#.#...#.#...#.#...#.....#.#.....#.......#.......#.....#.......#.#.......#.....#
#.#.###.###.#.#####.#.#.#####.#.#.#####.#.###.#.#.#######.#####.#####.###.#.###.#####.#.#.###.#.#.###########.#####.#######.#.#########.###.#
#.#...#.....#.....#.#.#.........#.#...#.#...#.#.#.......#.#.....#...........#.#.....#.#...#.#...#.......#...#.#.......#.....#...............#
#####.###.#.#.###.###.#####.#.###.#.#.#.###.###.###.#####.#.###.#####.#.###.#.#####.#.#####.#.#######.#.#.#.###.#####.#################.#####
#.......#...#.....#.....#.#.#...#.#.#.#...#...#.....#.....#...........#...#.#.....#.#...#...#.......#.#...#.#.......#.......#.......#.......#
#.#######.#.#.#####.###.#.#.###.#.#.#####.###.#.#####.#####.#############.#.#.###.#.###.###.#.#####.#######.#.#########.#.#.#.#####.#.#.###.#
#.........#...#.....#...#.#...#...#.....#.#.#.#...#.#.#.......#.....#.....#.#...#...........#...#...#.......#...#.......#.#.#...#.#.......#.#
#.#######.###.#.#####.###.###.#######.###.#.#.###.#.#.###.###.#.###.###.#.#.###.#.#.#.#######.###.###.###.#####.#.#.#####.#.###.#.#########.#
#.......#.#.....#...#.....#.#.........#...#.#...#...#...#...#.#...#...#...#.#...#.#.#.#.....#.#...#...#...#.....#.#.#.....#...#.#.....#...#.#
#.###.#.#.#.#.#.#.#.#.###.#.#####.#.###.###.###.#######.#.#.#.#.#####.#####.###.#.#.###.###.#.#.#####.###.#.#####.###.#####.###.#.###.#.#.#.#
#.....#.#.#.#.#.#.#.....#.#...#...#.#...#.....#...........#...#.#...#.#...#...#.#.......#.#...#.#...#...#...#...#.....#...#.......#...#.#...#
#######.#.#.#.#.#.#####.#.#.#.#.#####.###.#.#############.#####.#.#.#.#.#.###.#.#.#######.#####.#.#.###.###.#.#.#########.#############.###.#
#.#.....#.....#.#.#...#.#...#.#.......#...#.#.......#...........#.#...#.#.....................#...#...#...#...#.......#.....#...#...#...#.#.#
#.#.#####.#####.#.###.#.#####.#########.#####.#####.#.###########.###.#.#########.#############.#####.###.###########.#.#.#.#.###.#.#.###.#.#
#...#...........#.#...#.#.....#.#.....#.......#...#...#...#.....#.#.#.#...#...#...#...........#...#...#.....#.......#.#.#...#.#...#...#.....#
#.###.###########.#.#.#.#.#####.#.#.###.#.#.###.#.#####.#.#.###.#.#.#.###.#.#.#.###.#########.#####.###.#####.#.#####.#.#.###.#.#############
#.....#.......#.....#.#.#...#...#.#...#.#.......#.#.....#.#.....#.#...#...#.#.#...#.#.#.....#.....#.#.........#...#.....#...#.#.....#.......#
#######.#######.#####.#.###.#.#.#.###.#.#######.#.#.#####.#.#.#.#.#####.###.#.###.#.#.#.###.#####.#.#.#.#########.#.#.#.###.#.#####.#.#####.#
#.......#...#...#...#.#...#.#.#.#...#.....#.....#.#...#.#.#.#.#...#.....#.#.#...#.#.#...#...#.....#.#.........#...#.#...#.........#.....#...#
###.#.#.#.#.#.###.#.###.#.#.###.#.#########.#####.###.#.#.###.#.###.#####.#.###.#.#.#.###.#.#.#####.#########.#.###.#.###.###.#####.#####.###
#...#.#...#.....#.#.....#.#...#...#...#.....#...#.#...#.......#.#...#.....#.#.#.#.#.#.#...#.#.#.......#...#...#...#...#.#.#...#...#...#...#.#
#.###.#########.#.#######.###.#####.#.#.#####.#.#.#.#############.###.#.#.#.#.#.###.###.###.#.#.#####.#.###.#####.#####.#.###.#.#.###.#.###.#
#.....#.#...#...#.....#.....#.......#...#.....#.....#.............#.....#.#.#...#...#...#...#.#...#.#.#.....#...#.#...#...#...#.#...#.#...#.#
#.#####.#.#.#####.###.#.###.#############.#.###.###.#.#############.#.#.###.#.###.###.#####.#.###.#.#.#.#####.###.#.#.#.###.#.#.###.#.#.#.#.#
#.......#.#.....#...#.#.....#.....#.....#.#.#...#...#...#...............#...#.....#.........#.#.....#.#.......#...#.#...#...#.#.#.#.#...#.#.#
#########.#####.###.#.###.#####.#.###.#.#.#.#.###.#.###.###.###.#######.#.#########.#######.#.###.###.#######.#.###.#####.###.#.#.#.#.###.#.#
#.....#...#.....#...#...#...#...#.....#.#.#.#...#.....#.....#.#.....#...#...#.#.......#.....#.......#.....#...........#...#...#.#.#.#.#...#.#
#.###.#.#.#####.#.#.###.###.#.#.#####.###.#.#.#.#####.#######.#####.#.#####.#.#.#####.#.###########.#####.###########.###.#.###.#.#.###.###.#
#.#.....#.#...#...#...#.......#.#.....#...#.#.#.....#.#.......#.....#.#...#.#.........#...........#.....#...........#.#...#...#.#.......#...#
#.#######.#.#.#######.#.#####.###.#.###.###.###.#.###.###.###.#.#####.#.#.#.###.#####.#####.###########.#######.###.#.#.#.###.#.#########.#.#
#...#.#...#.#.#.....#.#...#...#...#...#...#.....#.........#...#.#.....#.#...#...#.....#.....#.........#.....#...#...#.#.#.#...#.....#...#.#.#
###.#.#.###.#.#.###.#.###.###.#.#####.#.#.#.#######.#####.#####.#.#.###.###.#.#.#######.#####.#####.#######.#.#.#.###.#.#.#.#######.###.#.#.#
#...#...#...#.#...#.#...#...#.#.....#.#...#...#...#.#...#.#.....#.#...#.#.#...#.......#...#...#...#.......#...#...#.#...#...#...#...#...#.#.#
#.###.###.###.###.#.###.###.#.#####.#.#.###.###.#.###.#.###.#########.###.#.#.#######.###.#.###.#####.#.#.#########.#.#######.#.#.###.###.#.#
#...#.#...#.#...#.#...#.#...#.#.#...#.#.#...#...#...........#.........#.....#...#.........#.#.......#...#.........#.#.#.......#.............#
###.#.#.###.###.###.###.#.###.#.#.###.#.###.#.###############.###.#####.#######.#.#####.#.#.#####.#.#.#.#.#######.#.#.#.###########.###.###.#
#...#.#...........#.....#.#.....#...#...#...#.....#.....#...........#...#...#...#.....#.#.#.....#.#.#.#.#.#...#...#...#...........#...#...#.#
#.#####.#.###.###.#.#####.#####.###.#####.#.#.#.#.###.#.#####.#####.#.###.#.#.#######.#.#######.#.#.#.#.###.#.###.###.###.#######.#.#.###.#.#
#...#...#...#.#...#.#...........#.#.#.....#.#...#.#...#.....#.#...#...#...#.#.#.....#.#.......#.#.#.#.#.....#...#...#.....................#.#
###.#.###.###.#.###.#####.###.#.#.#.#####.#####.#.#.#######.###.#.#.###.###.#.#####.#.#######.#.#.#.#.#########.###.#######.#.#.###.#######.#
#...#.#.#.#.......#.....#.........#.....#.......#...#.....#.....#.#.#...#.#...#.....#.#.....#...#.#.........#...#...#.....#.#.#...#.....#...#
#.###.#.#.#.#####.#####.#.#######.#####.#.#.###.#####.#.#.#######.###.###.#####.###.#.#.#.#.###.#.#####.#####.###.###.###.#.#.###.#.#.###.###
#.#...#...#.#...#.#.....#.#.#.........#.#.#.#...#.....#.#...#...#.....#.......#...#.#...#.#...#...#.....#...#.#.......#.#.#...#...#.#...#...#
#.#.#######.#.#.#.#####.#.#.#.#########.#.#.#####.#####.#####.#.#######.#####.#.#.#######.###.###.#######.#.#.#.#######.#.#####.#####.#.#.#.#
#...#.......#.#.#.#...#...#.....#.......#.#.........#.#.....#.#.......#.#...#...#.#.........#.#...#.....#.#...#.........#.......#.....#.....#
#.###.#.#####.#.#.#.#.###.#####.#.#.#.###.#########.#.#.#.#.#.#.#####.#.#.#.###.#.#.#######.#.#####.###.#.#####.#.###############.###.#.#.###
#.#...#.#...#.#.#...#.#...#...#...#.......#.......#...#...#.#.#.#...#...#.#.....#.......#.#.#...#...#.#.#.#.#...#.............#.......#.#...#
#.#.#.#.#.#.#.#.#.###.#.###.#.#.#########.#.#####.#######.#.#.#.#.#.#######.#.#########.#.#.###.#.###.#.#.#.#.#########.#######.#####.#.#.#.#
#.#.#.#.#.#.#.#...#...#.#.#.#...#.......#.#.#...#.#.....#.#.#.#.#.#.........#.......#.....#...#...#...#...#...#.......#...........#...#.#.#.#
#.###.#.#.#.#.###.#.###.#.#.#####.#.###.#.#.#.###.#.###.###.#.#.#.#####.#.###.#####.#.#####.#.#####.#.#########.#####.###.#########.#.###.#.#
#.....#.#.#...#.....#.#.#.#.#...#.#.#...#.#.#.....#.#.....#...#.#.....#.#.#.........#.#...#.#.........#.....#...#...#...#.#.#...#...#.....#.#
#######.#.###########.#.#.#.#.###.#.#.#####.#.#####.#####.#####.#######.#.#.###########.#.#####.#####.###.#.#.#####.###.#.#.#.#.#.###.#.#.#.#
#...#...#.......#.....#...#.#.....#.#.#.....#.....#...#.....#...#.......#.#.#...#.......#.......#...#.#...#...#.....#.#.#.#.#.#...#.....#...#
#.#.#.#########.###.#.###.#.#####.#.#.###.#######.#.#.###.#.#.###.#########.#.###.#.#.#############.#.#.#.#######.#.#.#.#.#.#.#####.#.#.#.#.#
#.#.#.....#...#...#.#...#.#.....#.#.#.....#.......#.#.....#...#.#.......#...#.....#.#.....#.#.......#...#...#.....#.#.#.#...#.....#.#.#...#.#
#.#.#####.###.###.#.#.###.#####.###.#########.###########.#####.#.#####.#.#####.###.#.###.#.#.###.#########.#.#.###.#.#.###.#####.#.#.#.#.#.#
#.#.....#.........#.#...#.....#...#.........#.#...........#.....#.#.#...#.#...#.#.#.#.#.....#...#...........#.#.#.#...#.#.#.#...#.....#...#.#
#.#####.#####.#.#######.#####.###.#.#######.#.#.###.###########.#.#.#.###.#.#.#.#.#.#.#####.###.#####.#######.#.#.#.###.#.#.#.#.###.#.#.#.#.#
#.#...#.....#.#.#.......#.....#...#.....#.#.#.#.#...#.#.......#.....#...#...#.....#.#...#.#.#.#.#...#...#.....#.#...#...#...#.#.#...#.....#.#
#.#.#.#####.#.#.###.#####.#####.#######.#.#.#.###.###.#.###.#.#####.###.#####.#####.#.#.#.#.#.#.#.#.###.#.#####.#####.###.###.#.#.#.#.#.###.#
#.#.#.....#.#.#...#.......#...#...#.....#.#.#.....#...#...#.#.......#.......#...#...#.#.#.....#...#...#.#...#...#...#.#.........#.#.........#
#.#####.#.#.#.###.#########.#.###.#.#.###.#.#######.#.###.#.#######.#.###.#.###.#.###.#.#########.#####.#.###.###.#.#.###########.#.#.#.#.###
#...#...#.#.#.#.#...#.....#.#...#...#.....#.#.......#.#...#...#.......#...#...#.#...#.#.#...#.....#.....#.#...#...#.#...........#.#...#.....#
###.#.#####.#.#.###.#.###.#.###.###.#####.#.###.###.###.#####.#########.#####.#.###.#.#.#.#.#.#####.###.#.#.###.###.###########.#.#########.#
#...#.......#.....#...#.#...#.#...#.#.....#...#...#.....#...#.#.......#.#.....#.......#.....#.#...#.#...#.#...#.#.#.....#.....#.#...........#
#.#####.#########.#####.#####.###.#.#########.###.#.#####.###.#.#####.#.#.#.#.#########.#.#.#.#.###.###.#.###.#.#.#####.#.#.###.#.#.###.#.###
#.....#.....#...#...#.........#...#...........#.#.....#.....#...#.....#.#.#.............#.#...#...#...#.#.#.#.#.......#.#.#.....#...#...#.#.#
#.###.#.#.###.#.###.#.#.###.#.#.###.#.#########.#####.#.###.#####.#####.#.#.#############.#######.###.#.#.#.#.###.#####.#.#########.#.###.#.#
#.#...#...#...#.....#.#...#...#.#...#...#.........#...#...#.....#.......#.#.#.....#.....#...#.....#.#.....#.#...#.#.....#.........#...#.#.#.#
#.#.###.###.#############.#.#.#.#.#####.#.#.#####.#.###########.###.#####.###.###.#.###.###.###.#.#.#.###.#.###.#.#.###.#########.###.#.#.#.#
#.#.......#...#...........#...#.#.......#.#...#...#.#.........#.........#...#...#.#...#.....#...#...#.#...#...#...#.#.......#.....#...#.....#
#.#####.#.###.#.#######.###.#.#.#######.#.###.###.#.#.#######.#.#######.#.#.#.#.#.###.#######.#####.#.#.###.#.#####.#######.#.#####.###.###.#
#.#.....#...#.......#...#...#.#.....#...#.........#.#.#.....#.#.......#.#...#...#.#...#...#.......#.#.#.#.......#.........#.#...#...#.....#.#
#.#.###.###.#####.#.#.###.#.#.#####.#.#.###.###.###.#.#.###.#.#.#####.#.#.#####.#.#.#####.#.#####.#.#.#.###.###.#.#######.#.###.#.###.#.#.###
#.#.#.#...#.......#.#.#...#.#.......#.#...#.#.#.....#.#...#...#.....#.#.#...#...#.#.#...#.....#.#.#.#.#.....#.#.#.......#.#.#.#.#.#.....#...#
#.#.#.#.#.###.###.###.#.###.###.#.#.#.###.#.#.###.###.###.###.#####.#.#####.#.###.#.#.#.#####.#.#.#.#.#######.#.#####.#.#.#.#.#.#.#.###.#.#.#
#.#...#.....#.#...#...#.#.#.#.#.#.#.#.#.#...#.....#...#.#.....#.....#.....#...#.#...#.#.....#...#.#...........#.......#.#.#...#.#.#.#.#.....#
#.#####.#.###.#####.#.#.#.#.#.#.#.#.#.#.#####.###.#.###.#####.#####.#####.#####.#####.#####.#####.#.###########.#######.#.###.#.#.#.#.#.#.#.#
#.#.....#.#...#...#...#.#.#.#...#.#.#...#.....#...#.#.....#.#.....#.....#...#.........#...#...#...#.......#.........#...#.#...#.#.....#.#.#.#
#.#.#####.#.###.#.#.#.#.#.#.###.#.#####.###.###.###.###.#.#.###.#.#.#####.#.#.#.#####.#.#.###.#.#.#######.#.#.#.#####.###.###.#.#######.#.#.#
#...#.....#.....#...#...#.....#.#.#...#.....#.#.....#...#.#.#.....#.#...#.#...#.........#...#.#.#...#...#...#.#.#...#...#...#.#.#.......#...#
#######.###########.#.#######.###.#.#.#######.#######.###.#.#.#######.#.#.#.###.#.###########.#.###.#.#.#####.###.#.###.###.#.#.#.#####.#.###
#.....#.......#...#.#...#...#.....#.#...........#.....#.....#.........#...#.....#.........#...#...#.#.#.....#.....#.........#.#.#.#...#.....#
#.###.#####.#.#.#.#.###.#.#.#####.#.#.#######.#.#.###.#.###.#############.###############.#.###.#.#.#####.#.#############.#.###.#.#.#.#.#.#.#
#...#.#.....#.#.#.#...#...#.#.....#.#...............#.#.............#.....................#...#.#.....#...#.........#...#.#.#...#...#...#.#.#
#.#.#.#.#.#.#.#.#.#######.#.#######.###############.#.#.###########.#######.#.###########.###.#.#.###.#.#.#####.###.###.#.###.###.#####.#.#.#
#.#.#.#.#.....#.#...........#.......#.#.....#.....#.#.#.......#...........#.#.#.....#.......#.#.#.#...#.#...#...#.......#.#...#...........#.#
###.#.#.###.###.###.#.#######.#######.#.###.#.###.###.#.#.#.#.###.#######.#.#.#.###.#######.#.#.#.#.###.###.#.#.#.#######.#.###.#####.#####.#
#...#.#.#.......#...#.........#.......#.#...#...#...#...#.#.#...#.#...#...#.#.#...#.......#...................#.#.#.......#...#.#...#.#...#.#
#.###.###.#.###.#####.###########.#.###.#.###.#.###.###.#.#.###.###.#.#.###.#####.#######.###.###.#.#####.#####.#.#.#####.#.#.###.#.###.#.#.#
#...#...#.....#.#.....#.........#.#.#...#.#...#...#.......#...#.....#.#...#.....#.....#.#...#...#.#...#...........#.....#.#.#...#.#.....#.#.#
#.#.###.#.#.#.###.###.#.#######.#.###.###.#.#####.#####.#####.#######.###.###.#.#####.#.###.###.#.#.#.#############.###.#.#.###.#.#######.#.#
#.#...#.#...#...#.#.#.........#.#.#...#...#.#.....#...#.#.....#...#...#...#...#...#...#...#.#...#...#.#...........#.#...#.....#.#.#.........#
#.###.#.###.###.#.#.#.#####.#.#.#.#.###.#####.#####.#.###.#####.#.#.###.###.###.#.#.###.#.#.#.#####.#.#.#########.###.###.#.###.#.###########
#...#.#.#.......#.#.#...#...#.#.#.#...#.......#...#.#...#.......#.#.#.......#...#.....................#...#.....#.#...#...#.....#...........#
###.#.#.#.#.#####.#.#.#.#.###.#.#.###.###.#####.#.#.###.#####.#####.#.#######.#.#.###.#.#.#.#.###.#.#.###.#####.#.#.#######.###########.###.#
#.#.#.#...#.......#.....#.#...#.#...#...#.#.....#.#.#...#.....#.....#...#.......#.#...#.#.#.#...#.#...#.#.#...#.....#.....#...#.......#.#...#
#.#.#.#####.#########.###.#.#.#.#.#####.###.#####.#.#.###.#####.#########.#####.#.#.###.#.#.###.#.#.###.#.#.#.#######.###.#.#.#.#####.###.###
#...#.#.....#...#...#.#.....................#...#.#.#.#...#.......................................#.#...#...#.#...#...#.#.....#.#...#...#...#
#.###.#.#####.#.#.#.#.#.###.#######.#.###.#.#.#.#.#.#.#.###.#####.#####.#.#.#.#.###.#.###.#######.#.#.#.#####.#.#.#.###.#####.#.#.#####.###.#
#S..#.........#...#.....#...........#...#.....#.#...#.....#...........#.....#.#.......#...........#...#.....#...#...............#...........#
#############################################################################################################################################

14
main.py
View File

@ -8,3 +8,17 @@ import src.day_04.part_1
import src.day_04.part_2
import src.day_05.part_1
import src.day_05.part_2
import src.day_07.part_1
import src.day_07.part_2
import src.day_10.part_1
import src.day_10.part_2
import src.day_11.part_1
import src.day_11.part_2
import src.day_12.part_1
import src.day_12.part_2
import src.day_13.part_1
import src.day_13.part_2
import src.day_15.part_1
import src.day_15.part_2
import src.day_16.part_1
import src.day_16.part_2

29
src/day_07/part_1.py Normal file
View File

@ -0,0 +1,29 @@
def main():
lines = open('inputs/07.txt').read().splitlines()
total = 0
for line in lines:
test_value, params = line.split(": ")
test_value = int(test_value)
params = [ int(p) for p in params.split(' ') ]
if calculates_somehow(test_value, params):
total += test_value
print(f"Day 07 part 1: {total}")
def calculates_somehow(test_value, params):
# print(test_value, params)
if len(params) == 0:
return False
elif len(params) == 1:
return params[0] == test_value
else:
h1, h2, t = params[0], params[1], params[2:]
return (
calculates_somehow(test_value, [ h1 * h2 ] + t) or
calculates_somehow(test_value, [ h1 + h2 ] + t)
)
# if __name__ == '__main__':
main()

33
src/day_07/part_2.py Normal file
View File

@ -0,0 +1,33 @@
def main():
lines = open('inputs/07.txt').read().splitlines()
total = 0
for line in lines:
test_value, params = line.split(": ")
test_value = int(test_value)
params = [ int(p) for p in params.split(' ') ]
if calculates_somehow(test_value, params):
total += test_value
print(f"Day 07 part 2: {total}")
def calculates_somehow(test_value, params):
# print(test_value, params)
if len(params) == 0:
return False
elif len(params) == 1:
return params[0] == test_value
else:
h1, h2, t = params[0], params[1], params[2:]
return (
calculates_somehow(test_value, [h1 * h2] + t) or
calculates_somehow(test_value, [ h1 + h2 ] + t) or
calculates_somehow(test_value, [concat_operator(h1, h2)] + t)
)
def concat_operator(a : int, b : int) -> int:
return int(str(a) + str(b))
# if __name__ == '__main__':
main()

41
src/day_10/part_1.py Normal file
View File

@ -0,0 +1,41 @@
def main():
grid = [ [ int(c) for c in line.strip() ] for line in open('inputs/10.txt') ]
WIDTH = len(grid[0])
HEIGHT = len(grid)
total = 0
# print(WIDTH, HEIGHT)
for y, line in enumerate(grid):
for x, c in enumerate(line):
if c == 0:
s = set()
s.add(( x, y ))
total += search(0, s, grid)
print(f"Day 10 part 1: {total}")
def search(level, items, grid) -> int:
if level == 9:
return len(items)
s = set()
new_level = level + 1
for x, y in items:
if x - 1 >= 0 and grid[y][x - 1] == new_level:
s.add(( x-1, y ))
if x + 1 < len(grid[0]) and grid[y][x + 1] == new_level:
s.add(( x+1, y ))
if y - 1 >= 0 and grid[y-1][x] == new_level:
s.add(( x, y-1 ))
if y + 1 < len(grid) and grid[y+1][x] == new_level:
s.add(( x, y+1 ))
return search(new_level, s, grid)
# if __name__ == '__main__':
main()

41
src/day_10/part_2.py Normal file
View File

@ -0,0 +1,41 @@
def main():
grid = [ [ int(c) for c in line.strip() ] for line in open('inputs/10.txt') ]
WIDTH = len(grid[0])
HEIGHT = len(grid)
total = 0
# print(WIDTH, HEIGHT)
for y, line in enumerate(grid):
for x, c in enumerate(line):
if c == 0:
s = set()
s.add(( x, y ))
total += search(0, s, grid)
print(f"Day 10 part 2: {total}")
def search(level, items, grid) -> int:
if level == 9:
return len(items)
s = []
new_level = level + 1
for x, y in items:
if x - 1 >= 0 and grid[y][x - 1] == new_level:
s.append(( x-1, y ))
if x + 1 < len(grid[0]) and grid[y][x + 1] == new_level:
s.append(( x+1, y ))
if y - 1 >= 0 and grid[y-1][x] == new_level:
s.append(( x, y-1 ))
if y + 1 < len(grid) and grid[y+1][x] == new_level:
s.append(( x, y+1 ))
return search(new_level, s, grid)
# if __name__ == '__main__':
main()

30
src/day_11/part_1.py Normal file
View File

@ -0,0 +1,30 @@
import functools
def main():
total = 0
for stone in open("inputs/11.txt").read().strip().split(" "):
total += count_stones(int(stone), 25)
print(f"Day 11 part 1: {total}")
@functools.cache
def count_stones(number : int, blinks : int) -> int:
"""Count the number of stones after a given number of blins"""
if blinks <= 0:
return 1
elif number == 0:
return count_stones(1, blinks - 1)
s = str(number)
if len(s) % 2 == 0:
i = len(s)// 2
return count_stones(int(s[:i]), blinks - 1)+ count_stones(int(s[i:]), blinks - 1)
else:
return count_stones(2024 * number, blinks - 1)
# if __name__ == "__main__":
main()

30
src/day_11/part_2.py Normal file
View File

@ -0,0 +1,30 @@
import functools
def main():
total = 0
for stone in open("inputs/11.txt").read().strip().split(" "):
total += count_stones(int(stone), 75)
print(f"Day 11 part 2: {total}")
@functools.cache
def count_stones(number : int, blinks : int) -> int:
"""Count the number of stones after a given number of blins"""
if blinks <= 0:
return 1
elif number == 0:
return count_stones(1, blinks - 1)
s = str(number)
if len(s) % 2 == 0:
i = len(s)// 2
return count_stones(int(s[:i]), blinks - 1) + count_stones(int(s[i:]), blinks - 1)
else:
return count_stones(2024 * number, blinks - 1)
# if __name__ == "__main__":
main()

64
src/day_12/part_1.py Normal file
View File

@ -0,0 +1,64 @@
import itertools
def main():
lines = [ [ c for c in line.strip() ] for line in open('inputs/12.txt') ]
width = len(lines[0])
height = len(lines)
chars = {}
nodes = set()
for y, line in enumerate(lines):
d = {}
for x, c in enumerate(line):
nodes.add(( x, y ))
d[x] = c
chars[y] = d
total = 0
while len(nodes) > 0:
# Pick a new item and start finding its blob
items, cursor = [ nodes.pop() ], 0
# Find matching neighbours
while cursor < len(items):
x, y = items[cursor]
if y + 1 < height and chars[y+1][x] == chars[y][x]:
if ( x, y + 1 ) in nodes:
nodes.remove(( x, y + 1 ))
items.append(( x, y + 1 ))
if y - 1 >= 0 and chars[y-1][x] == chars[y][x]:
if ( x, y - 1 ) in nodes:
nodes.remove(( x, y - 1 ))
items.append(( x, y - 1 ))
if x + 1 < width and chars[y][x+1] == chars[y][x]:
if ( x + 1, y ) in nodes:
nodes.remove(( x + 1, y ))
items.append(( x + 1, y ))
if x - 1 >= 0 and chars[y][x-1] == chars[y][x]:
if ( x - 1, y ) in nodes:
nodes.remove(( x - 1, y ))
items.append(( x - 1, y ))
cursor += 1
items = set(items)
border = []
# Find borders
for x, y in items:
for dx, dy in itertools.product([ -1, 0, 1 ], repeat=2):
if abs(dx) + abs(dy) == 1:
if ( x + dx, y + dy ) not in items:
border.append(( x + dx, y + dy ))
total += len(items) * len(border)
print(f"Day 12 part 1: {total}")
# if __name__ == "__main__":
main()

101
src/day_12/part_2.py Normal file
View File

@ -0,0 +1,101 @@
import itertools
def main():
lines = [ [ c for c in line.strip() ] for line in open('inputs/12.txt') ]
width = len(lines[0])
height = len(lines)
chars = {}
nodes = set()
for y, line in enumerate(lines):
d = {}
for x, c in enumerate(line):
nodes.add(( x, y ))
d[x] = c
chars[y] = d
total = 0
while len(nodes) > 0:
# Pick a new item and start finding its blob
items, cursor = [ nodes.pop() ], 0
# Find matching neighbours
while cursor < len(items):
x, y = items[cursor]
if y + 1 < height and chars[y+1][x] == chars[y][x]:
if ( x, y + 1 ) in nodes:
nodes.remove(( x, y + 1 ))
items.append(( x, y + 1 ))
if y - 1 >= 0 and chars[y-1][x] == chars[y][x]:
if ( x, y - 1 ) in nodes:
nodes.remove(( x, y - 1 ))
items.append(( x, y - 1 ))
if x + 1 < width and chars[y][x+1] == chars[y][x]:
if ( x + 1, y ) in nodes:
nodes.remove(( x + 1, y ))
items.append(( x + 1, y ))
if x - 1 >= 0 and chars[y][x-1] == chars[y][x]:
if ( x - 1, y ) in nodes:
nodes.remove(( x - 1, y ))
items.append(( x - 1, y ))
cursor += 1
items = set(items)
borders = 0
items_x = set([ x for (x, _) in items ])
items_y = set([ y for (y, _) in items ])
# Find borders
for x in range(min(items_x), max(items_x) + 1):
left, right = False, False
for y in range(min(items_y), max(items_y) + 1):
if (x, y) in items and (x - 1, y) not in items:
left = True
elif left:
left = False
borders += 1
if (x, y) in items and (x + 1, y) not in items:
right = True
elif right:
right = False
borders += 1
else:
if left:
borders += 1
if right:
borders += 1
for y in range(min(items_y), max(items_y) + 1):
up, down = False, False
for x in range(min(items_x), max(items_x) + 1):
if (x, y) in items and (x, y - 1) not in items:
up = True
elif up:
up = False
borders += 1
if (x, y) in items and (x, y + 1) not in items:
down = True
elif down:
down = False
borders += 1
else:
if up:
borders += 1
if down:
borders += 1
total += len(items) * borders
print(f"Day 12 part 2: {total}")
# if __name__ == "__main__":
main()

40
src/day_13/part_1.py Normal file
View File

@ -0,0 +1,40 @@
import re
def main():
lines = open('inputs/13.txt').read()
match_string = (
r"Button A: X\+(\d+), Y\+(\d+)" + "\n" +
r"Button B: X\+(\d+), Y\+(\d+)" + "\n" + r"Prize: X=(\d+), Y=(\d+)"
)
total = 0
for machine in re.findall(match_string, lines):
score = test_claw_machine(*machine)
# print(f"{machine} -> {score}")
if score:
total += score
print(f"Day 13 part 1: {total}")
def test_claw_machine(a_x, a_y, b_x, b_y, p_x, p_y) -> int | None:
a_x, a_y = int(a_x), int(a_y)
b_x, b_y = int(b_x), int(b_y)
p_x, p_y = int(p_x), int(p_y)
alpha = (p_x - p_y * b_x / b_y) / (a_x - a_y * b_x / b_y)
a = alpha
b = (p_y - a_y * alpha) / b_y
a = round(a)
b = round(b)
if a * a_x + b * b_x == p_x and a * a_y + b * b_y == p_y:
return 3 * a + b
# if __name__ == "__main__":
main()

40
src/day_13/part_2.py Normal file
View File

@ -0,0 +1,40 @@
import re
def main():
lines = open('inputs/13.txt').read()
match_string = (
r"Button A: X\+(\d+), Y\+(\d+)" + "\n" +
r"Button B: X\+(\d+), Y\+(\d+)" + "\n" + r"Prize: X=(\d+), Y=(\d+)"
)
total = 0
for machine in re.findall(match_string, lines):
score = test_claw_machine(*machine)
# print(f"{machine} -> {score}")
if score:
total += score
print(f"Day 13 part 2: {total}")
def test_claw_machine(a_x, a_y, b_x, b_y, p_x, p_y) -> int | None:
a_x, a_y = int(a_x), int(a_y)
b_x, b_y = int(b_x), int(b_y)
p_x, p_y = int(p_x) + 10000000000000, int(p_y) + 10000000000000
alpha = (p_x - p_y * b_x / b_y) / (a_x - a_y * b_x / b_y)
a = alpha
b = (p_y - a_y * alpha) / b_y
a = round(a)
b = round(b)
if a * a_x + b * b_x == p_x and a * a_y + b * b_y == p_y:
return 3 * a + b
# if __name__ == "__main__":
main()

116
src/day_15/part_1.py Normal file
View File

@ -0,0 +1,116 @@
from enum import Enum, auto
def main():
grid, instructions = read_input('inputs/15.txt')
for i in instructions:
grid.move(i)
print(f"Day 15 part 1: {grid.get_gps()}")
class Direction(Enum):
Left = auto()
Up = auto()
Right = auto()
Down = auto()
def from_char(c : str):
match c:
case '<':
return Direction.Left
case '^':
return Direction.Up
case '>':
return Direction.Right
case 'v':
return Direction.Down
def from_str(s : str):
dirs = []
for c in s:
d = Direction.from_char(c)
if d is not None:
dirs.append(d)
return dirs
class Grid:
def __init__(self, s : str) -> None:
"""
Create a new grid tracker.
"""
self.walls = set()
self.boxes = set()
self.robot = None
for y, line in enumerate(s.strip().split("\n")):
for x, c in enumerate(line.strip()):
match c:
case '#':
self.walls.add(( x, y ))
case 'O':
self.boxes.add(( x, y ))
case '@':
self.robot = ( x, y )
# Make sure it has been initialized
if self.robot is None:
raise ValueError("Did not find robot in grid")
def get_gps(self) -> int:
total = 0
for x, y in self.boxes:
total += x + 100 * y
return total
def move(self, dir : Direction) -> bool:
step = 1
while True:
pos = self.steps(dir, step)
if pos in self.walls:
return False
elif pos in self.boxes:
step += 1
# Empty space! The robot can move
elif step == 1:
self.robot = pos
return True
else:
self.boxes.add(pos)
rpos = self.steps(dir, 1)
self.boxes.remove(rpos)
self.robot = rpos
return True
def steps(self, d : Direction, steps : int) -> ( int, int ):
x, y = self.robot
match d:
case Direction.Left:
return ( x - steps, y )
case Direction.Up:
return ( x, y - steps )
case Direction.Right:
return ( x + steps, y )
case Direction.Down:
return ( x, y + steps )
def read_input(file_name):
g, d = open(file_name).read().strip().split("\n\n")
return Grid(g), Direction.from_str(d)
# if __name__ == "__main__":
main()

244
src/day_15/part_2.py Normal file
View File

@ -0,0 +1,244 @@
# 1480694 too high
from enum import Enum, auto
import time
def main():
grid, instructions = read_input('inputs/15.txt')
for i in instructions:
grid.move(i)
print(f"Day 15 part 2: {grid.get_gps()}")
class Direction(Enum):
Left = auto()
Up = auto()
Right = auto()
Down = auto()
def from_char(c : str):
match c:
case '<':
return Direction.Left
case '^':
return Direction.Up
case '>':
return Direction.Right
case 'v':
return Direction.Down
def from_str(s : str):
dirs = []
for c in s:
d = Direction.from_char(c)
if d is not None:
dirs.append(d)
return dirs
def to_char(d) -> str:
match d:
case Direction.Left:
return '<'
case Direction.Up:
return '^'
case Direction.Right:
return '>'
case Direction.Down:
return 'v'
class Grid:
def __init__(self, s : str) -> None:
"""
Create a new grid tracker.
"""
self.walls = set()
self.boxes = set()
self.robot = None
self.width = 0
self.height = 0
for y, line in enumerate(s.strip().split("\n")):
self.width = max(self.width, 2 * len(line.strip()))
self.height = y + 1
for x, c in enumerate(line.strip()):
match c:
case '#':
self.walls.add(( 2*x, y ))
self.walls.add(( 2*x + 1, y ))
case 'O':
self.boxes.add(( 2*x, y ))
case '@':
self.robot = ( 2*x, y )
# Make sure it has been initialized
if self.robot is None:
raise ValueError("Did not find robot in grid")
def __repr__(self):
lines = []
for y in range(self.height):
s = ""
for x in range(self.width):
if (x, y) in self.walls:
s += "#"
elif ( x, y ) in self.boxes:
s += "["
elif ( x - 1, y ) in self.boxes:
s += "]"
elif ( x, y ) == self.robot:
s += "@"
else:
s += "."
lines.append(s)
return "\n".join(lines)
def get_gps(self) -> int:
total = 0
for x, y in self.boxes:
total += x + 100 * y
return total
def move(self, d : Direction) -> bool:
match d:
case Direction.Right:
step = 1
while True:
pos = self.steps(d, step)
if pos in self.walls:
return False
if pos in self.boxes:
step += 2
else:
for i in range(step // 2):
self.boxes.remove(self.steps(d, 2*i+1))
self.boxes.add(self.steps(d, 2*i+2))
self.robot = self.steps(d, 1)
break
case Direction.Up | Direction.Down:
boxes = []
x, y = self.steps(d, 1)
if (x, y) in self.walls:
return False
# Gather boxes, if necessary
if (x, y) in self.boxes:
boxes.append(( x, y ))
if ( x - 1, y ) in self.boxes:
boxes.append(( x - 1, y ))
# If a box is blocking, use BFS to look for walls
i = 0
dy = -1 if d == Direction.Up else 1
while i < len(boxes):
x, y = boxes[i]
left = ( x - 1, y + dy )
middle = ( x, y + dy )
right = ( x + 1, y + dy )
# Note how left only matters if there's a box there of width 2
if middle in self.walls:
return False
if right in self.walls:
return False
if left in self.boxes and left not in boxes:
boxes.append(left)
if middle in self.boxes:
boxes.append(middle)
if right in self.boxes:
boxes.append(right)
# if left in self.boxes and right in self.boxes:
# print("Found a splitter!")
i += 1
# Once all boxes have been found, move all of them.
# In reverse order, so they don't accidentally merge.
for x, y in reversed(boxes):
self.boxes.remove(( x, y ))
self.boxes.add(( x, y + dy ))
self.robot = self.steps(d, 1)
case Direction.Left:
step = 1
while True:
pos = self.steps(d, step)
box = self.steps(d, step + 1)
if pos in self.walls:
return False
if pos in self.boxes:
# A box should not be here
raise ValueError(
f"Robot ({self.robot}) was found with clipping box at ({pos})"
)
# This space seems empty!
# Let's make sure there's no box to the left, otherwise it
# counts as a box.
if box in self.boxes:
# Crap.
step += 2
else:
# Goodness. We can move!
for i in range(step // 2):
self.boxes.remove(self.steps(d, 2*i+2))
self.boxes.add(self.steps(d, 2*i+3))
self.robot = self.steps(d, 1)
break
# print(f"Moving to {d}")
# t = time.sleep(0.1)
# print()
# print()
# print()
# print(self.__repr__().replace('@', Direction.to_char(d)))
def steps(self, d : Direction, steps : int) -> ( int, int ):
x, y = self.robot
match d:
case Direction.Left:
return ( x - steps, y )
case Direction.Up:
return ( x, y - steps )
case Direction.Right:
return ( x + steps, y )
case Direction.Down:
return ( x, y + steps )
def read_input(file_name):
g, d = open(file_name).read().strip().split("\n\n")
return Grid(g), Direction.from_str(d)
# if __name__ == "__main__":
main()

100
src/day_16/part_1.py Normal file
View File

@ -0,0 +1,100 @@
from enum import Enum, auto
def main():
grid = Grid(open('inputs/16.txt').read())
print(f"Day 16 part 1: {grid.get_score(*grid.start, Direction.Right)}")
class Direction(Enum):
Up = auto()
Right = auto()
Down = auto()
Left = auto()
def take_step(self, x : int, y : int, size : int) -> ( int, int ):
match self:
case Direction.Up:
return ( x, y + size )
case Direction.Right:
return ( x + size, y )
case Direction.Down:
return ( x, y - size )
case Direction.Left:
return ( x - size, y )
def turn_left(self):
match self:
case Direction.Up:
return Direction.Left
case Direction.Right:
return Direction.Up
case Direction.Down:
return Direction.Right
case Direction.Left:
return Direction.Down
def turn_right(self):
match self:
case Direction.Up:
return Direction.Right
case Direction.Right:
return Direction.Down
case Direction.Down:
return Direction.Left
case Direction.Left:
return Direction.Up
class Grid:
def __init__(self, text : str) -> None:
self.walls = set()
for y, line in enumerate(text.split('\n')):
for x, c in enumerate(line.strip()):
match c:
case '#':
self.walls.add((x, y))
case 'S':
self.start = (x, y)
case 'E':
self.finish = (x, y)
self.score = {}
# Start determining the optimal order
stack = [
( *self.finish, Direction.Up, 0 ),
( *self.finish, Direction.Right, 0 ),
( *self.finish, Direction.Down, 0 ),
( *self.finish, Direction.Left, 0 ),
]
while True:
try:
x, y, d, score = stack.pop()
except IndexError:
return
if (x, y) in self.walls:
continue
old_score = self.get_score(x, y, d)
if old_score is not None and old_score <= score:
continue
# If we get here, then we have found a new optimal path
self.set_score(x, y, d, score)
stack.append((*d.take_step(x, y, -1), d, score + 1))
stack.insert(0, (x, y, d.turn_left(), score + 1000))
stack.insert(0, (x, y, d.turn_right(), score + 1000))
def get_score(self, x : int, y : int, d : Direction) -> int | None:
try:
return self.score[( x, y, d )]
except KeyError:
return None
def set_score(self, x : int, y : int, d : Direction, val : int) -> None:
self.score[( x, y, d )] = val
# if __name__ == "__main__":
main()

169
src/day_16/part_2.py Normal file
View File

@ -0,0 +1,169 @@
# 624 too low
from enum import Enum, auto
# Ridiculously high number - this is beyond the weights of the grid
NON_NUMBER = int(1e9)
def main():
grid = Grid(open('inputs/16.txt').read())
# print(grid.get_score(*grid.start, Direction.Right))
print(f"Day 16 part 2: {grid.find_best_spots() + 1}")
class Direction(Enum):
Up = auto()
Right = auto()
Down = auto()
Left = auto()
def take_step(self, x : int, y : int, size : int) -> ( int, int ):
match self:
case Direction.Up:
return ( x, y + size )
case Direction.Right:
return ( x + size, y )
case Direction.Down:
return ( x, y - size )
case Direction.Left:
return ( x - size, y )
def turn_left(self):
match self:
case Direction.Up:
return Direction.Left
case Direction.Right:
return Direction.Up
case Direction.Down:
return Direction.Right
case Direction.Left:
return Direction.Down
def turn_right(self):
match self:
case Direction.Up:
return Direction.Right
case Direction.Right:
return Direction.Down
case Direction.Down:
return Direction.Left
case Direction.Left:
return Direction.Up
class Grid:
def __init__(self, text : str) -> None:
self.walls = set()
self.optimal_coords = set()
self.width, self.height = 0, 0
for y, line in enumerate(text.split('\n')):
self.height = y + 1
self.width = max(self.width, len(line.strip()))
for x, c in enumerate(line.strip()):
match c:
case '#':
self.walls.add((x, y))
case 'S':
self.start = (x, y)
case 'E':
self.finish = (x, y)
self.score = {}
# Start determining the optimal order
stack = [
( *self.finish, Direction.Up, 0 ),
( *self.finish, Direction.Right, 0 ),
( *self.finish, Direction.Down, 0 ),
( *self.finish, Direction.Left, 0 ),
]
while True:
try:
x, y, d, score = stack.pop()
except IndexError:
return
if (x, y) in self.walls:
continue
old_score = self.get_score(x, y, d)
if old_score is not None and old_score <= score:
continue
# If we get here, then we have found a new optimal path
self.set_score(x, y, d, score)
stack.append((*d.take_step(x, y, -1), d, score + 1))
stack.insert(0, (x, y, d.turn_left(), score + 1000))
stack.insert(0, (x, y, d.turn_right(), score + 1000))
def __repr__(self):
lines = []
for y in range(self.height):
s = ""
for x in range(self.width):
if (x, y) in self.walls:
s += "#"
elif (x, y) == self.start:
s += "S"
elif (x, y) == self.finish:
s += "E"
elif (x, y) in self.optimal_coords:
s += "O"
else:
s += "."
lines.append(s)
return "\n".join(lines)
def find_best_spots(self) -> int:
"""
Find all positions that lie on an optimal path.
"""
queue = [ ( *self.start, Direction.Right ) ]
i = 0
while i < len(queue):
x, y, d = queue[i]
forward = ( *d.take_step(x, y, 1), d )
t_left = ( x, y, d.turn_left() )
t_right = ( x, y, d.turn_right() )
score_forward = (self.get_score(*forward) or NON_NUMBER) + 1
score_t_left = (self.get_score(*t_left) or NON_NUMBER) + 1000
score_t_right = (self.get_score(*t_right) or NON_NUMBER) + 1000
best_score = min(score_forward, score_t_left, score_t_right)
if best_score >= NON_NUMBER:
raise ValueError("Optimal path has no path to the finish")
if score_forward == best_score and forward not in queue:
queue.append(forward)
if score_t_left == best_score and t_left not in queue:
queue.append(t_left)
if score_t_right == best_score and t_right not in queue:
queue.append(t_right)
i += 1
self.optimal_coords = set(( x, y ) for x, y, _ in queue)
return len(self.optimal_coords)
def get_score(self, x : int, y : int, d : Direction) -> int | None:
try:
return self.score[( x, y, d )]
except KeyError:
return None
def set_score(self, x : int, y : int, d : Direction, val : int) -> None:
self.score[( x, y, d )] = val
# if __name__ == "__main__":
main()