Compare commits
No commits in common. "2167efbb3a828ea41f099d70f4dc612a62859498" and "437f31dcc584746694b54618a6d4a69fa5852fdf" have entirely different histories.
2167efbb3a
...
437f31dcc5
4 changed files with 0 additions and 2644 deletions
141
20/input
141
20/input
|
@ -1,141 +0,0 @@
|
||||||
#############################################################################################################################################
|
|
||||||
#...#...###...#####...#...#.......#####.....#...#.........###...###...#.....#...#.......#.....#...#...###...#.......#...........#.....#.....#
|
|
||||||
#.#.#.#.###.#.#####.#.#.#.#.#####.#####.###.#.#.#.#######.###.#.###.#.#.###.#.#.#.#####.#.###.#.#.#.#.###.#.#.#####.#.#########.#.###.#.###.#
|
|
||||||
#.#.#.#.#...#...#...#.#.#.#.....#...#...#...#.#...#.......#...#.#...#.#.#...#.#.#...#...#...#...#...#.#...#.#...#...#.#.........#...#.#...#.#
|
|
||||||
#.#.#.#.#.#####.#.###.#.#.#####.###.#.###.###.#####.#######.###.#.###.#.#.###.#.###.#.#####.#########.#.###.###.#.###.#.###########.#.###.#.#
|
|
||||||
#.#.#.#.#.....#...#...#.#.#.....#...#...#.#...#.....#...###.#...#...#.#.#...#.#.###.#.#...#.....#.....#...#.#...#.....#.....#...#...#...#.#.#
|
|
||||||
#.#.#.#.#####.#####.###.#.#.#####.#####.#.#.###.#####.#.###.#.#####.#.#.###.#.#.###.#.#.#.#####.#.#######.#.#.#############.#.#.#.#####.#.#.#
|
|
||||||
#.#...#.......#.....#...#.#.....#...#...#.#.#...#.....#...#.#.#...#.#.#.#...#.#.#...#.#.#.#...#.#...#...#.#.#.#.............#.#...#.....#.#.#
|
|
||||||
#.#############.#####.###.#####.###.#.###.#.#.###.#######.#.#.#.#.#.#.#.#.###.#.#.###.#.#.#.#.#.###.#.#.#.#.#.#.#############.#####.#####.#.#
|
|
||||||
#.#...#...#...#...###.#...#...#.#...#...#...#...#...#.....#.#.#.#.#.#.#.#...#.#...#...#.#.#.#.#.#...#.#.#.#.#.#.....#...###...#.....#...#.#.#
|
|
||||||
#.#.#.#.#.#.#.###.###.#.###.#.#.#.#####.#######.###.#.#####.#.#.#.#.#.#.###.#.#####.###.#.#.#.#.#.###.#.#.#.#.#####.#.#.###.###.#####.#.#.#.#
|
|
||||||
#...#.#.#...#...#...#.#.#...#.#.#.#...#...#.....#...#...###.#.#.#.#.#...#...#.#.....#...#...#.#.#.....#...#...#...#.#.#...#...#.......#...#.#
|
|
||||||
#####.#.#######.###.#.#.#.###.#.#.#.#.###.#.#####.#####.###.#.#.#.#.#####.###.#.#####.#######.#.###############.#.#.#.###.###.#############.#
|
|
||||||
#...#.#.###...#.#...#.#.#...#.#.#.#.#.#...#...#...#.....#...#...#.#.....#...#.#.#...#.....#...#.#.....#.........#...#...#.....#...#...#.....#
|
|
||||||
#.#.#.#.###.#.#.#.###.#.###.#.#.#.#.#.#.#####.#.###.#####.#######.#####.###.#.#.#.#.#####.#.###.#.###.#.###############.#######.#.#.#.#.#####
|
|
||||||
#.#...#.#...#...#.....#...#.#.#.#.#.#.#...#...#...#.....#.......#.###...#...#.#...#...###.#.###.#.###.#.....#...#...###.#.......#...#...#...#
|
|
||||||
#.#####.#.###############.#.#.#.#.#.#.###.#.#####.#####.#######.#.###.###.###.#######.###.#.###.#.###.#####.#.#.#.#.###.#.###############.#.#
|
|
||||||
#.......#.........#.....#.#.#...#...#.###.#.#...#.....#...###...#.....#...###...#.....#...#...#...#...#...#...#...#.#...#.#...#...#...###.#.#
|
|
||||||
#################.#.###.#.#.#########.###.#.#.#.#####.###.###.#########.#######.#.#####.#####.#####.###.#.#########.#.###.#.#.#.#.#.#.###.#.#
|
|
||||||
#.................#.#...#.#.....#.....#...#...#...#...#...#...#.....#...###...#.#.....#.#...#.###...#...#...#.....#.#...#.#.#...#...#.....#.#
|
|
||||||
#.#################.#.###.#####.#.#####.#########.#.###.###.###.###.#.#####.#.#.#####.#.#.#.#.###.###.#####.#.###.#.###.#.#.###############.#
|
|
||||||
#.........#.........#...#.......#.###...#.........#...#.###...#.#...#.#...#.#...#.....#...#.#.#...#...#####...#...#.#...#...#.....#...#.....#
|
|
||||||
#########.#.###########.#########.###.###.###########.#.#####.#.#.###.#.#.#.#####.#########.#.#.###.###########.###.#.#######.###.#.#.#.#####
|
|
||||||
#.......#...#...#...#...#...#...#...#...#.........#...#.....#...#...#.#.#.#.....#...#...#...#...#...#...#...###.....#.#...#...###...#.#.#...#
|
|
||||||
#.#####.#####.#.#.#.#.###.#.#.#.###.###.#########.#.#######.#######.#.#.#.#####.###.#.#.#.#######.###.#.#.#.#########.#.#.#.#########.#.#.#.#
|
|
||||||
#.#...#.###...#...#...#...#...#...#.....#.........#.....#...###...#.#...#...###.#...#.#.#.....#...#...#.#.#...#...#...#.#...#.....#...#...#.#
|
|
||||||
#.#.#.#.###.###########.#########.#######.#############.#.#####.#.#.#######.###.#.###.#.#####.#.###.###.#.###.#.#.#.###.#####.###.#.#######.#
|
|
||||||
#...#.#.....#...#...#...###...###.......#.......#...#...#...#...#.#.......#.....#.#...#...###.#...#.#...#.#...#.#.#.#...#...#.#...#.#.....#.#
|
|
||||||
#####.#######.#.#.#.#.#####.#.#########.#######.#.#.#.#####.#.###.#######.#######.#.#####.###.###.#.#.###.#.###.#.#.#.###.#.#.#.###.#.###.#.#
|
|
||||||
###...#.......#...#...#...#.#.#.......#.#.......#.#.#.#.....#...#.###...#.#.......#.....#.....#...#.#...#.#.....#...#...#.#...#...#...###...#
|
|
||||||
###.###.###############.#.#.#.#.#####.#.#.#######.#.#.#.#######.#.###.#.#.#.###########.#######.###.###.#.#############.#.#######.###########
|
|
||||||
#...#...#.......#.......#.#.#.#...#...#.#.#...#...#.#.#.#.....#.#.#...#...#.....#...#...#.......###.#...#.#...........#...#.....#.....#.....#
|
|
||||||
#.###.###.#####.#.#######.#.#.###.#.###.#.#.#.#.###.#.#.#.###.#.#.#.###########.#.#.#.###.#########.#.###.#.#########.#####.###.#####.#.###.#
|
|
||||||
#...#.###.....#.#.......#...#.....#...#.#.#.#.#...#.#.#.#...#.#.#.#.......#.....#.#.#.#...#...#...#.#.#...#.........#.#.....###...#...#.#...#
|
|
||||||
###.#.#######.#.#######.#############.#.#.#.#.###.#.#.#.###.#.#.#.#######.#.#####.#.#.#.###.#.#.#.#.#.#.###########.#.#.#########.#.###.#.###
|
|
||||||
#...#.#.......#.......#...#.........#.#.#.#.#.#...#.#.#...#.#.#.#...#...#.#.#...#.#.#.#...#.#.#.#.#.#...#.....#...#.#.#.....#...#...#...#...#
|
|
||||||
#.###.#.#############.###.#.#######.#.#.#.#.#.#.###.#.###.#.#.#.###.#.#.#.#.#.#.#.#.#.###.#.#.#.#.#.#####.###.#.#.#.#.#####.#.#.#####.#####.#
|
|
||||||
#.....#.........#...#...#.#.###.....#...#.#.#.#...#.#...#.#.#.#...#.#.#.#.#.#.#.#.#.#.#...#.#.#.#.#.#...#...#...#...#.#...#.#.#...#...#.....#
|
|
||||||
###############.#.#.###.#.#.###.#########.#.#.###.#.###.#.#.#.###.#.#.#.#.#.#.#.#.#.#.#.###.#.#.#.#.#.#.###.#########.#.#.#.#.###.#.###.#####
|
|
||||||
#.....#.......#...#...#.#...#...#.......#...#...#.#.#...#...#...#.#...#...#.#.#.#.#.#.#...#.#.#.#.#.#.#.....#.......#...#...#.#...#.#...#...#
|
|
||||||
#.###.#.#####.#######.#.#####.###.#####.#######.#.#.#.#########.#.#########.#.#.#.#.#.###.#.#.#.#.#.#.#######.#####.#########.#.###.#.###.#.#
|
|
||||||
#...#.#.....#.#...#...#.......#...#.....#...###.#.#.#...###...#.#.........#.#.#...#...###...#.#.#.#.#.#.....#...#...#.....#...#.....#.....#.#
|
|
||||||
###.#.#####.#.#.#.#.###########.###.#####.#.###.#.#.###.###.#.#.#########.#.#.###############.#.#.#.#.#.###.###.#.###.###.#.###############.#
|
|
||||||
#...#.....#.#...#...#...#...#...###.......#...#.#.#.#...#...#...#...#.....#.#...#.............#.#.#.#...#...###.#...#...#.#.#.........#.....#
|
|
||||||
#.#######.#.#########.#.#.#.#.###############.#.#.#.#.###.#######.#.#.#####.###.#.#############.#.#.#####.#####.###.###.#.#.#.#######.#.#####
|
|
||||||
#.......#.#.....#...#.#...#.#.#.............#.#...#.#...#...#...#.#.#.....#...#.#.....#.....#...#.#.#.....#...#.#...#...#...#.......#...#...#
|
|
||||||
#######.#.#####.#.#.#.#####.#.#.###########.#.#####.###.###.#.#.#.#.#####.###.#.#####.#.###.#.###.#.#.#####.#.#.#.###.#############.#####.#.#
|
|
||||||
#.......#.......#.#...###...#.#.#.........#.#.#.....#...#...#.#.#.#.#.....###.#.#.....#.###...###...#.......#...#...#.#.............#...#.#.#
|
|
||||||
#.###############.#######.###.#.#.#######.#.#.#.#####.###.###.#.#.#.#.#######.#.#.#####.###########################.#.#.#############.#.#.#.#
|
|
||||||
#.........#.......#.....#.....#...#.......#...#.....#...#.#...#.#.#.#.###...#...#.....#.#.......#...#...............#.#.#...#...#.....#...#.#
|
|
||||||
#########.#.#######.###.###########.###############.###.#.#.###.#.#.#.###.#.#########.#.#.#####.#.#.#.###############.#.#.#.#.#.#.#########.#
|
|
||||||
#.........#.#.....#...#.###...###...#...#...###...#.....#...#...#.#.#.....#...#.......#.#.#...#.#.#.#.....#...#.......#...#...#...#.........#
|
|
||||||
#.#########.#.###.###.#.###.#.###.###.#.#.#.###.#.###########.###.#.#########.#.#######.#.#.#.#.#.#.#####.#.#.#.###################.#########
|
|
||||||
#...#...#...#...#.....#.....#...#.....#...#.....#.........###...#.#.#...#.....#.........#...#.#.#.#.#...#...#...#...#.........#...#.....#...#
|
|
||||||
###.#.#.#.#####.###############.#########################.#####.#.#.#.#.#.###################.#.#.#.#.#.#########.#.#.#######.#.#.#####.#.#.#
|
|
||||||
###...#.#.#.....#...#.........#.......#...........#.....#.....#.#.#...#.#.###.........#...#...#...#...#.......#...#...###...#...#.....#...#.#
|
|
||||||
#######.#.#.#####.#.#.#######.#######.#.#########.#.###.#####.#.#.#####.#.###.#######.#.#.#.#################.#.#########.#.#########.#####.#
|
|
||||||
#...#...#.#.....#.#.#.#.....#...#...#...###...###.#...#.#...#.#.#.#.....#.#...#.....#...#.#...#...#...#...###.#...........#.......###.....#.#
|
|
||||||
#.#.#.###.#####.#.#.#.#.###.###.#.#.#######.#.###.###.#.#.#.#.#.#.#.#####.#.###.###.#####.###.#.#.#.#.#.#.###.###################.#######.#.#
|
|
||||||
#.#.#.....#.....#.#.#.#...#.....#.#.........#...#.....#...#...#...#...#...#...#.#...#...#.....#.#.#.#...#...#.#...#.....#...#...#.....###.#.#
|
|
||||||
#.#.#######.#####.#.#.###.#######.#############.#####################.#.#####.#.#.###.#.#######.#.#.#######.#.#.#.#.###.#.#.#.#.#####.###.#.#
|
|
||||||
#.#.#...###.....#.#...###...#.....#.....#...#...#...#...#...#.......#...###...#.#...#.#.#.......#.#.#.......#...#.#...#.#.#.#.#.......#...#.#
|
|
||||||
#.#.#.#.#######.#.#########.#.#####.###.#.#.#.###.#.#.#.#.#.#.#####.#######.###.###.#.#.#.#######.#.#.###########.###.#.#.#.#.#########.###.#
|
|
||||||
#.#.#.#.#...###...#...#...#...###...###...#.#.....#...#...#...#.....#...#...#...#...#.#.#.###...#...#...........#...#.#...#.#...#.....#.#...#
|
|
||||||
#.#.#.#.#.#.#######.#.#.#.#######.#########.###################.#####.#.#.###.###.###.#.#.###.#.###############.###.#.#####.###.#.###.#.#.###
|
|
||||||
#.#...#...#.#...#...#...#...#...#.......###...#...#...#.........#.....#.#...#.###.....#...#...#.................###...#...#...#...#...#...###
|
|
||||||
#.#########.#.#.#.#########.#.#.#######.#####.#.#.#.#.#.#########.#####.###.#.#############.###########################.#.###.#####.#########
|
|
||||||
#.........#.#.#...#.....#...#.#.###.....#...#...#.#.#.#...#.....#.....#...#...#...#...#...#.............................#...#.#...#...#...###
|
|
||||||
#########.#.#.#####.###.#.###.#.###.#####.#.#####.#.#.###.#.###.#####.###.#####.#.#.#.#.#.#################################.#.#.#.###.#.#.###
|
|
||||||
#.......#.#.#.#.....#...#.....#.....###...#...###...#.....#...#...###.#...###...#...#...#.....#.....#...#.......#.....#.....#.#.#...#...#...#
|
|
||||||
#.#####.#.#.#.#.#####.#################.#####.###############.###.###.#.#####.###############.#.###.#.#.#.#####.#.###.#.#####.#.###.#######.#
|
|
||||||
#...#...#.#.#...#.....#.....#...........#...#...###...###...#...#.#...#.....#...............#.#...#...#.#.....#...###.#.....#...###...#.....#
|
|
||||||
###.#.###.#.#####.#####.###.#.###########.#.###.###.#.###.#.###.#.#.#######.###############.#.###.#####.#####.#######.#####.#########.#.#####
|
|
||||||
#...#...#.#.#...#.#...#...#.#.#...........#...#.....#...#.#.#...#...#.......#...............#.....#...#.......#.....#.......#...#...#...#...#
|
|
||||||
#.#####.#.#.#.#.#.#.#.###.#.#.#.#############.#########.#.#.#.#######.#######.#####################.#.#########.###.#########.#.#.#.#####.#.#
|
|
||||||
#.....#...#...#.#...#...#.#.#.#.....#...#...#.#...#...#...#.#.......#.#.....#.................#.....#.#...###...#...#...###...#...#.......#.#
|
|
||||||
#####.#########.#######.#.#.#.#####.#.#.#.#.#.#.#.#.#.#####.#######.#.#.###.#################.#.#####.#.#.###.###.###.#.###.###############.#
|
|
||||||
#...#.........#.#...###...#...#...#...#.#.#.#...#...#.#.....#.......#...#...#.....#...#.......#...#...#.#...#.#...###.#...#.#...............#
|
|
||||||
#.#.#########.#.#.#.###########.#.#####.#.#.#########.#.#####.###########.###.###.#.#.#.#########.#.###.###.#.#.#####.###.#.#.###############
|
|
||||||
#.#...........#...#.#...###...#.#.....#...#...###...#.#.....#.....#.....#.###...#...#.#.#...#.....#...#.#...#.#.#...#.#...#.#.......###...###
|
|
||||||
#.#################.#.#.###.#.#.#####.#######.###.#.#.#####.#####.#.###.#.#####.#####.#.#.#.#.#######.#.#.###.#.#.#.#.#.###.#######.###.#.###
|
|
||||||
#...#...#...#.....#...#.#...#.#.....#.......#...#.#.#.......###...#...#...#.....#...#.#...#...###...#...#.#...#...#...#.....#.....#.....#...#
|
|
||||||
###.#.#.#.#.#.###.#####.#.###.#####.#######.###.#.#.###########.#####.#####.#####.#.#.###########.#.#####.#.#################.###.#########.#
|
|
||||||
###...#...#...###.#...#.#...#.....#.......#...#.#.#...#.....#...#.....#...#.......#.#.#.......#...#.......#.#.........#...#...###...........#
|
|
||||||
#################.#.#.#.###.#####.#######.###.#.#.###.#.###.#.###.#####.#.#########.#.#.#####.#.###########.#.#######.#.#.#.#################
|
|
||||||
#.................#.#.#...#.....#.........#...#...#...#.#...#...#.#...#.#...#...#...#...#.....#.............#.......#...#.#...#...#...#...###
|
|
||||||
#.#################.#.###.#####.###########.#######.###.#.#####.#.#.#.#.###.#.#.#.#######.#########################.#####.###.#.#.#.#.#.#.###
|
|
||||||
#...................#...#.#...#...........#.....#...#...#...###.#.#.#.#...#.#.#.#.......#...#...#...#.......#.......#...#.....#.#...#...#...#
|
|
||||||
#######################.#.#.#.###########.#####.#.###.#####.###.#.#.#.###.#.#.#.#######.###.#.#.#.#.#.#####.#.#######.#.#######.###########.#
|
|
||||||
#...###.................#...#.............#.....#.....#.....#...#...#...#.#.#.#.###...#...#.#.#...#...#...#...#...###.#.#.....#.#.......#...#
|
|
||||||
#.#.###.###################################.###########.#####.#########.#.#.#.#.###.#.###.#.#.#########.#.#####.#.###.#.#.###.#.#.#####.#.###
|
|
||||||
#.#.....#.........#...#.....#...........###.............#...#.......#...#.#.#.#.#...#...#.#.#.#.......#.#.....#.#...#.#.#...#...#.....#.#...#
|
|
||||||
#.#######.#######.#.#.#.###.#.#########.#################.#.#######.#.###.#.#.#.#.#####.#.#.#.#.#####.#.#####.#.###.#.#.###.#########.#.###.#
|
|
||||||
#.........#.......#.#.#.#...#.#.........#.....#...###.....#.#######.#...#.#.#.#.#.....#.#.#.#...#...#.#.#...#...#...#.#.###.#.........#...#.#
|
|
||||||
###########.#######.#.#.#.###.#.#########.###.#.#.###.#####.#######.###.#.#.#.#.#####.#.#.#.#####.#.#.#.#.#.#####.###.#.###.#.###########.#.#
|
|
||||||
#...###.....#...#...#...#.....#.....#...#.#...#.#...#...#...#####...#...#.#.#.#.#.....#...#.....#.#.#.#.#.#.......###.#.#...#.....#.....#...#
|
|
||||||
#.#.###.#####.#.#.#################.#.#.#.#.###.###.###.#.#######.###.###.#.#.#.#.#############.#.#.#.#.#.###########.#.#.#######.#.###.#####
|
|
||||||
#.#.#...#...#.#.#.#.............###...#...#...#...#...#.#...#####..S#...#.#...#.#.#.......#.....#.#.#...#...#.........#...#...#...#.#...#...#
|
|
||||||
#.#.#.###.#.#.#.#.#.###########.#############.###.###.#.###.###########.#.#####.#.#.#####.#.#####.#.#######.#.#############.#.#.###.#.###.#.#
|
|
||||||
#.#...#...#...#...#...........#.#.............###...#.#.#...#########...#.....#.#...#...#.#.###...#...#.....#.#.....#.....#.#.#.....#.....#.#
|
|
||||||
#.#####.#####################.#.#.#################.#.#.#.###########.#######.#.#####.#.#.#.###.#####.#.#####.#.###.#.###.#.#.#############.#
|
|
||||||
#...#...#.....................#.#...#.....#.....#...#.#.#...#########.#...#...#.....#.#.#.#...#.....#.#.......#...#...###...#...............#
|
|
||||||
###.#.###.#####################.###.#.###.#.###.#.###.#.###.#########.#.#.#.#######.#.#.#.###.#####.#.###########.###########################
|
|
||||||
#...#.###...........#...#.....#.....#.#...#.#...#.#...#.#...#########.#.#.#.....#...#.#.#.#...#...#.#.###...#...#.....#...#.................#
|
|
||||||
#.###.#############.#.#.#.###.#######.#.###.#.###.#.###.#.###########.#.#.#####.#.###.#.#.#.###.#.#.#.###.#.#.#.#####.#.#.#.###############.#
|
|
||||||
#...#...#.......###...#...#...#.....#.#...#.#...#.#.#...#.###########.#.#.....#.#...#.#.#.#.#...#.#.#...#.#.#.#.#...#...#...#.....#...#.....#
|
|
||||||
###.###.#.#####.###########.###.###.#.###.#.###.#.#.#.###.###########.#.#####.#.###.#.#.#.#.#.###.#.###.#.#.#.#.#.#.#########.###.#.#.#.#####
|
|
||||||
###.....#.....#.#.......###.#...#...#.#...#...#...#.#.#...#########...#.#.....#...#.#.#.#.#.#...#...###.#.#.#.#.#.#...#.......#...#.#...#...#
|
|
||||||
#############.#.#.#####.###.#.###.###.#.#####.#####.#.#.###########.###.#.#######.#.#.#.#.#.###.#######.#.#.#.#.#.###.#.#######.###.#####.#.#
|
|
||||||
#.........#...#...#...#.....#...#.....#.#.....###...#.#...#########.....#.#...#...#...#.#.#...#...#.....#.#...#...#...#.....###...#.......#.#
|
|
||||||
#.#######.#.#######.#.#########.#######.#.#######.###.###.###############.#.#.#.#######.#.###.###.#.#####.#########.#######.#####.#########.#
|
|
||||||
#.......#.#...#.....#.....#.....#.......#.......#...#.#...###########.....#.#.#.#.......#...#...#.#.....#.........#...#...#.....#.#.....#...#
|
|
||||||
#######.#.###.#.#########.#.#####.#############.###.#.#.#############.#####.#.#.#.#########.###.#.#####.#########.###.#.#.#####.#.#.###.#.###
|
|
||||||
###.....#.....#.#.........#.#.....#.....#.......###.#.#...###########.....#.#...#.#...#...#...#...#.....#.........#...#.#.#.....#.#.###.#...#
|
|
||||||
###.###########.#.#########.#.#####.###.#.#########.#.###.###############.#.#####.#.#.#.#.###.#####.#####.#########.###.#.#.#####.#.###.###.#
|
|
||||||
#...#.....#...#.#...#...#...#.....#.###.#.###.....#...###.###.....#.......#...#...#.#.#.#.#...#...#.....#...#...#...#...#.#.....#.#...#.#...#
|
|
||||||
#.###.###.#.#.#.###.#.#.#.#######.#.###.#.###.###.#######.###.###.#.#########.#.###.#.#.#.#.###.#.#####.###.#.#.#.###.###.#####.#.###.#.#.###
|
|
||||||
#...#...#...#...###...#.#.###.....#.#...#...#...#...#...#.#E#.#...#...#...#...#...#.#...#.#.#...#.......#...#.#.#.#...###.#...#.#.#...#...###
|
|
||||||
###.###.###############.#.###.#####.#.#####.###.###.#.#.#.#.#.#.#####.#.#.#.#####.#.#####.#.#.###########.###.#.#.#.#####.#.#.#.#.#.#########
|
|
||||||
###.....#...#...###...#.#.#...#...#.#.#...#.....#...#.#...#...#.#...#...#.#.#.....#.#.....#.#.......#...#.....#.#.#.....#...#...#.#.........#
|
|
||||||
#########.#.#.#.###.#.#.#.#.###.#.#.#.#.#.#######.###.#########.#.#.#####.#.#.#####.#.#####.#######.#.#.#######.#.#####.#########.#########.#
|
|
||||||
###.......#...#.....#...#.#...#.#.#.#...#.#.....#.###.....#...#...#...###...#.....#.#.#...#.#.......#.#...#.....#.#.....#.......#.#...#.....#
|
|
||||||
###.#####################.###.#.#.#.#####.#.###.#.#######.#.#.#######.###########.#.#.#.#.#.#.#######.###.#.#####.#.#####.#####.#.#.#.#.#####
|
|
||||||
#...#.......#...#.....#...#...#.#...###...#...#...#.......#.#...#...#...........#...#...#.#.#.#...#...#...#.....#.#.......#...#.#.#.#.#.#...#
|
|
||||||
#.###.#####.#.#.#.###.#.###.###.#######.#####.#####.#######.###.#.#.###########.#########.#.#.#.#.#.###.#######.#.#########.#.#.#.#.#.#.#.#.#
|
|
||||||
#...#.#...#.#.#...###.#.#...#...#.......#...#.....#.....#...#...#.#.#...#...#...###...#...#.#.#.#.#.###.#...#...#.......#...#.#.#...#.#...#.#
|
|
||||||
###.#.#.#.#.#.#######.#.#.###.###.#######.#.#####.#####.#.###.###.#.#.#.#.#.#.#####.#.#.###.#.#.#.#.###.#.#.#.#########.#.###.#.#####.#####.#
|
|
||||||
#...#.#.#...#.###.....#.#.....#...#.....#.#.#.....#.....#.###.....#.#.#...#...#.....#...#...#.#.#.#...#...#.#.......###...###...#.....#...#.#
|
|
||||||
#.###.#.#####.###.#####.#######.###.###.#.#.#.#####.#####.#########.#.#########.#########.###.#.#.###.#####.#######.#############.#####.#.#.#
|
|
||||||
#...#.#...#...#...#.....###.....#...#...#.#.#.....#.#...#.........#.#...###...#.......#...#...#.#...#.#.....#...#...#.......#...#...#...#...#
|
|
||||||
###.#.###.#.###.###.#######.#####.###.###.#.#####.#.#.#.#########.#.###.###.#.#######.#.###.###.###.#.#.#####.#.#.###.#####.#.#.###.#.#######
|
|
||||||
#...#...#.#.#...#...#.......#...#...#.....#...#...#.#.#...#.....#.#...#...#.#...#.....#...#.#...###...#...#...#.#.....#...#...#...#.#.###...#
|
|
||||||
#.#####.#.#.#.###.###.#######.#.###.#########.#.###.#.###.#.###.#.###.###.#.###.#.#######.#.#.###########.#.###.#######.#.#######.#.#.###.#.#
|
|
||||||
#...#...#.#.#...#...#.....#...#.#...###...###.#...#.#.#...#.###.#...#...#...#...#.#.....#.#...###.........#...#...#.....#.....#...#.#.....#.#
|
|
||||||
###.#.###.#.###.###.#####.#.###.#.#####.#.###.###.#.#.#.###.###.###.###.#####.###.#.###.#.#######.###########.###.#.#########.#.###.#######.#
|
|
||||||
#...#...#.#.#...#...#.....#.###.#.#.....#.....#...#.#.#...#...#...#.#...#...#.###...###.#...#...#.......#.....#...#.........#.#...#...#...#.#
|
|
||||||
#.#####.#.#.#.###.###.#####.###.#.#.###########.###.#.###.###.###.#.#.###.#.#.#########.###.#.#.#######.#.#####.###########.#.###.###.#.#.#.#
|
|
||||||
#.#...#.#.#.#...#.#...#...#.#...#.#.#...#...#...#...#...#...#...#.#.#...#.#.#.........#.#...#.#.........#.....#...#...#...#.#.#...#...#.#.#.#
|
|
||||||
#.#.#.#.#.#.###.#.#.###.#.#.#.###.#.#.#.#.#.#.###.#####.###.###.#.#.###.#.#.#########.#.#.###.###############.###.#.#.#.#.#.#.#.###.###.#.#.#
|
|
||||||
#...#...#...###...#.....#...#.....#...#...#...###.......###.....#...###...#...........#...###.................###...#...#...#...###.....#...#
|
|
||||||
#############################################################################################################################################
|
|
118
20/main.rb
118
20/main.rb
|
@ -1,118 +0,0 @@
|
||||||
#!/usr/bin/env ruby
|
|
||||||
|
|
||||||
require "debug"
|
|
||||||
|
|
||||||
input = (ARGV.first.nil? ? DATA : ARGF)
|
|
||||||
.readlines(chomp: true)
|
|
||||||
.map(&:chars)
|
|
||||||
|
|
||||||
class PriorityQueue < Array
|
|
||||||
alias_method :extract_min, :shift
|
|
||||||
|
|
||||||
def <<(v)
|
|
||||||
super
|
|
||||||
sort_by!(&:last)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def unbounded?(graph, node)
|
|
||||||
node.first < 0 ||
|
|
||||||
node.last < 0 ||
|
|
||||||
node.first >= graph.size ||
|
|
||||||
node.last >= graph.first.size
|
|
||||||
end
|
|
||||||
|
|
||||||
def dijkstra(graph, source, target)
|
|
||||||
queue = PriorityQueue.new
|
|
||||||
dist = Hash.new
|
|
||||||
prev = Hash.new
|
|
||||||
|
|
||||||
queue << [source, 0]
|
|
||||||
dist[source] = 0
|
|
||||||
prev[source] = nil
|
|
||||||
|
|
||||||
until queue.empty?
|
|
||||||
node, picoseconds = queue.extract_min
|
|
||||||
|
|
||||||
[[0, 1], [0, -1], [1, 0], [-1, 0]]
|
|
||||||
.map { |dx, dy| [node.first + dx, node.last + dy] }
|
|
||||||
.reject { unbounded?(graph, _1) }
|
|
||||||
.each do |neighbor|
|
|
||||||
next if graph.dig(*neighbor) == "#"
|
|
||||||
|
|
||||||
if dist[neighbor].nil? || picoseconds + 1 < dist[neighbor]
|
|
||||||
dist[neighbor] = picoseconds + 1
|
|
||||||
prev[neighbor] = node
|
|
||||||
queue << [neighbor, picoseconds + 1]
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
path = Array.new
|
|
||||||
u = target
|
|
||||||
while prev[u]
|
|
||||||
path.unshift(u)
|
|
||||||
u = prev[u]
|
|
||||||
end
|
|
||||||
|
|
||||||
return dist, prev, path
|
|
||||||
end
|
|
||||||
|
|
||||||
def find_cheats(graph, dist, path, finish)
|
|
||||||
cheats = Hash.new
|
|
||||||
path.each do |node|
|
|
||||||
[[0, 2], [0, -2], [2, 0], [-2, 0]]
|
|
||||||
.map { |dx, dy| [node.first + dx, node.last + dy] }
|
|
||||||
.reject { unbounded?(graph, _1) }
|
|
||||||
.each do |neighbor|
|
|
||||||
next if graph.dig(*neighbor) == "#"
|
|
||||||
|
|
||||||
next if dist[node] >= dist[neighbor]
|
|
||||||
|
|
||||||
cheats[[node, neighbor]] = dist[neighbor] - dist[node] - 2
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return cheats
|
|
||||||
end
|
|
||||||
|
|
||||||
def manhattan_distance(node1, node2)
|
|
||||||
(node1.first - node2.first).abs + (node1.last - node2.last).abs
|
|
||||||
end
|
|
||||||
|
|
||||||
def discover(char, graph)
|
|
||||||
(0...graph.size).each do |x|
|
|
||||||
(0...graph.first.size).each do |y|
|
|
||||||
return [x, y] if char == graph.dig(x, y)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
start = discover("S", input)
|
|
||||||
finish = discover("E", input)
|
|
||||||
|
|
||||||
dist, prev, path = dijkstra(input, start, finish)
|
|
||||||
|
|
||||||
p find_cheats(input, dist, [start] + path, finish)
|
|
||||||
.values.tally.select { _1 >= 100 }.values.sum
|
|
||||||
|
|
||||||
p dist.keys.combination(2)
|
|
||||||
.select { manhattan_distance(_1, _2) <= 20 }
|
|
||||||
.count { dist[_2] - dist[_1] >= manhattan_distance(_1, _2) + 100 }
|
|
||||||
|
|
||||||
__END__
|
|
||||||
###############
|
|
||||||
#...#...#.....#
|
|
||||||
#.#.#.#.#.###.#
|
|
||||||
#S#...#.#.#...#
|
|
||||||
#######.#.#.###
|
|
||||||
#######.#.#...#
|
|
||||||
#######.#.###.#
|
|
||||||
###..E#...#...#
|
|
||||||
###.#######.###
|
|
||||||
#...###...#...#
|
|
||||||
#.#####.#.###.#
|
|
||||||
#.#...#.#.#...#
|
|
||||||
#.#.#.#.#.#.###
|
|
||||||
#...#...#...###
|
|
||||||
###############
|
|
53
22/main.rb
53
22/main.rb
|
@ -1,53 +0,0 @@
|
||||||
#!/usr/bin/env ruby
|
|
||||||
|
|
||||||
require "debug"
|
|
||||||
|
|
||||||
input = (ARGV.first.nil? ? DATA : ARGF)
|
|
||||||
.readlines(chomp: true)
|
|
||||||
.map(&:to_i)
|
|
||||||
|
|
||||||
def evolve(secret)
|
|
||||||
a = ((secret * 64) ^ secret) % 16777216
|
|
||||||
b = ((a / 32) ^ a) % 16777216
|
|
||||||
c = ((b * 2048) ^ b) % 16777216
|
|
||||||
end
|
|
||||||
|
|
||||||
part_1 = input.map do |secret|
|
|
||||||
original = secret
|
|
||||||
2000.times { secret = evolve(secret) }
|
|
||||||
|
|
||||||
secret
|
|
||||||
end.sum
|
|
||||||
|
|
||||||
p part_1
|
|
||||||
|
|
||||||
sequences = input.map do |secret|
|
|
||||||
secrets = 2000.times
|
|
||||||
.map { secret = evolve(secret) }
|
|
||||||
|
|
||||||
prices = secrets.map { _1.digits.first }
|
|
||||||
|
|
||||||
changes = prices
|
|
||||||
.map.with_index { |p, i| i == 0 ? 0 : p - prices[i - 1] }
|
|
||||||
|
|
||||||
sequences = Hash.new
|
|
||||||
changes[1..].each_cons(4).with_index.each do |sequence, i|
|
|
||||||
sequences[sequence] ||= prices[i + 4]
|
|
||||||
end
|
|
||||||
|
|
||||||
sequences
|
|
||||||
end
|
|
||||||
|
|
||||||
unique_sequences = sequences.flat_map(&:keys).uniq
|
|
||||||
|
|
||||||
part_2 = unique_sequences.map do |sequence|
|
|
||||||
sequences.sum { _1.fetch(sequence, 0) }
|
|
||||||
end.max
|
|
||||||
|
|
||||||
p part_2
|
|
||||||
|
|
||||||
__END__
|
|
||||||
1
|
|
||||||
10
|
|
||||||
100
|
|
||||||
2024
|
|
Loading…
Add table
Reference in a new issue