Skip to content

Instantly share code, notes, and snippets.

@mstksg
Created December 18, 2019 11:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mstksg/369653db93b5dd884824f28afaea5b35 to your computer and use it in GitHub Desktop.
Save mstksg/369653db93b5dd884824f28afaea5b35 to your computer and use it in GitHub Desktop.
AOC 2019 Day 18 Trees
###############
#d.ABC.#.....a#
######...######
######.@.######
######...######
#b.....#.....c#
###############
(0,Nothing)
|
`- (6,Just 'c')
(0,Nothing)
|
`- (6,Just 'a')
(0,Nothing)
|
`- (6,Just 'b')
(0,Nothing)
|
`- (2,Just 'C')
|
`- (1,Just 'B')
|
`- (1,Just 'A')
|
`- (2,Just 'd')
#############
#DcBa.#.GhKl#
#.###...#I###
#e#d#.@.#j#k#
###C#...###J#
#fEbA.#.FgHi#
#############
(0,Nothing)
|
`- (2,Just 'F')
|
`- (1,Just 'g')
|
`- (1,Just 'H')
|
`- (1,Just 'i')
|
`- (1,Just 'J')
|
`- (1,Just 'k')
(0,Nothing)
|
`- (2,Just 'G')
|
`- (1,Just 'h')
|
+- (1,Just 'I')
| |
| `- (1,Just 'j')
|
`- (1,Just 'K')
|
`- (1,Just 'l')
(0,Nothing)
|
`- (2,Just 'A')
|
`- (1,Just 'b')
|
+- (1,Just 'E')
| |
| `- (1,Just 'f')
|
`- (1,Just 'C')
|
`- (1,Just 'd')
(0,Nothing)
|
`- (2,Just 'a')
|
`- (1,Just 'B')
|
`- (1,Just 'c')
|
`- (1,Just 'D')
|
`- (2,Just 'e')
#############
#g#f.D#..h#l#
#F###e#E###.#
#dCba...BcIJ#
#####.@.#####
#nK.L...G...#
#M###N#H###.#
#o#m..#i#jk.#
#############
(0,Nothing)
|
+- (1,Just 'H')
| |
| `- (1,Just 'i')
|
`- (1,Just 'G')
|
`- (6,Just 'k')
|
`- (1,Just 'j')
(0,Nothing)
|
+- (1,Just 'E')
| |
| `- (3,Just 'h')
|
`- (1,Just 'B')
|
`- (1,Just 'c')
|
`- (1,Just 'I')
|
`- (1,Just 'J')
|
`- (2,Just 'l')
(0,Nothing)
|
+- (1,Just 'L')
| |
| `- (2,Just 'K')
| |
| `- (1,Just 'n')
| |
| `- (1,Just 'M')
| |
| `- (1,Just 'o')
|
`- (1,Just 'N')
|
`- (3,Just 'm')
(0,Nothing)
|
+- (1,Just 'a')
| |
| `- (1,Just 'b')
| |
| `- (1,Just 'C')
| |
| `- (1,Just 'd')
| |
| `- (1,Just 'F')
| |
| `- (1,Just 'g')
|
`- (1,Just 'e')
|
`- (1,Just 'D')
|
`- (2,Just 'f')
#################################################################################
#.#.........#...#....r#.......#...#.....#.....#...........#.......#......c......#
#X#.#####.#.#.#.#.###.#####.#.#.#.#.###.#.###.#.#######Q###.#.###.#.#####.###.#.#
#...#.....#...#...#.#.....#.#...#.....#.#.#...#.#.....#.....#.#.#.#.#...#.#.#.#.#
#.###.#############.#####.#.###########.#.#.#####.###.#.#####.#.#.###F#.#.#.#.###
#...#.#j......#.......P.#.#.#.......#...#.#.....#...#.#.#.....#...#...#.#...#...#
###.#.#.###.#.#.#######.#.###.#####.#.#.#.#####.###.#.###.#####.###.###.#######.#
#...#.#...#.#.#.......#.#.....#...#...#.#.....#.#...#...#.#...#.#...#...#.....M.#
#.###.#.###.#.#######.#.#######.#.#####.#.###.#.#.#####.#.#.###.#.#####.#.#######
#.#...#.#...#.#.....#.#.........#.......#.#.#.#...#.......#.....#.....#.#...#...#
#.#.#####.###.#.#.###.###################.#.#.###.#############.#.###.#.###.#.#.#
#.#...#...#...#.#...#.#...#.......#.....#...#.#...#.....#.....#.#...#.#...#...#.#
#.###.#.#####.#.###.#.#.#.#.#####.#.#.#####.#.#####.###.#.###.#.###.#.###.#.###.#
#...#.#..g..#.#.#...#.L.#.#.#..n#.#.#...#...#.....#.#..i#.#...#...#.#.#.#.#.#...#
#####.#####.###.#.#.#####.#.#.#.#.#####.#####.###.#.#.###.#.#####.###.#.#.#.#.###
#.....#...#.....#.#.#.......#.#.#...#...#...#...#...#.....#...#...#...#.#.#.#...#
#D#####.#.#######.###.#######.#.###.#.#.#.#.#############.###.#.###U###.#A#####.#
#.......#.#.H...#.....#...E...#...#...#.#.#...#.........#...#.#...#.#...........#
#.#######.#.###.#######.#########.#####.#.###.#.#######.#.###.###.#.###########.#
#.#.....#.#.#.#e........#.....N...#...#.#.#.....#.....#.#.#...#...#...#.......#y#
#.###.#.#.#.#.#########.#.#########.###.#.#######.###.#.###.#####.#.#.#.#####.#.#
#...#.#.#.#.#.....#.O.#.#.#.......#.....#.#...#.....#....z#.#...#.#.#.#.#...#.#.#
###.#.###.#.#.###.#.#####.#.#####.#.#####.#.#.###########.#.###.#.#.#.#.###.#.#.#
#.....#.V.#.#.#...#......o#.#.....#.#...#...#.T.......#.......#.#.#.#.......#.#.#
#######.###.#.#.#############.#####.#.#.#.###########.#########.#.###########.#.#
#.....#...#...#..b#...#.......#.....#.#.#.#.....#...#.........#.#.......#.....#.#
#.###.###.#######.#.#.#####.###.#####.###.#.#####.#.###.#####.#.#######.#.#######
#.#.#.#...#.....#...#...#...#...#.......#.#.#.....#...#.....#.#.......#.#.......#
#.#.#.#.#.#.###.#######.#.###.#########.#.#.#.#######.#####S#.#######.#.#.#####.#
#u#...#.#.#...#.......#.#.....#.......#.#.#.#...#...#.....#.#.....#...#.#.#.#..v#
#.###.#.#.###.#####.#.#.###.###.#####.#.#.#.###.#.#.#####.#######.#.###.#.#.#.#.#
#...#...#...#.#...#.#.#...#...#.#.#...#.#.....#.#.#.#.....#.......#.#.#.#...#.#.#
###.###W#####.#.###.#####.###.#.#.#.###.#.#####.#.#.#####.#.#######.#.#.###.#.###
#...#...#.......#...#...#.#.#...#...#...#.#.....#.#.....#...#.......#.#..d#.#...#
#.#######.#######.###.#.#.#.#####.###.#.#.#.#####.#####.#####.#######.###.#.###.#
#.......#a..#.#.Y.#...#...#.....#.....#.#.#.....#.....#...#...#...#.....#.#.#...#
#.#####.###.#.#.#.#.#######.#.#.#######.#.#####.###.#####.#.###.###.###.#.#.#.#.#
#.....#...#.#.#.#.#...#.#...#.#.#.......#.#...#.....#.....#.#.....#...#.#.#.#.#.#
#####.#.###.#.#.#####.#.#.###.###.#######.###.#######.#####.#.###.###.#.#.###.#.#
#....f#.......#....m..#.....#.......................#.......#...#.....#.......#.#
#######################################.@.#######################################
#...#.....#...#...#.#.......#.....#...........#.....#.#.......#...........#.....#
#.#.#.#.#.#.#.#.#.#.#.#.###.#.###.#####.#.###.###.#.#.#.#####.#.#######.#.###.#.#
#.#...#.#...#.#.#...#.#...#...#.........#...#...#.#...#.#...#.#.#.#...#.#.#...#.#
#######.#####.#.###.#.###.#############.###.###.#.###.#.#.###.#.#.#.#.#.#.#.###.#
#.....#.#.......#...#s#.#.#.........#...#...#...#...#.#.#.#...#...#.#...#...#.#.#
#.###.#.#############.#.#.#.#######.#.###.#####.#.#.###.#.#.#####.#.#########.#.#
#...#...#...............#.#.#.#.....#.#.#.....#t#.#...#.#.#.#.....#...#.......#.#
#.#.#####.###############.#.#.#.#####.#.#.###.#.#####.#.#.#.#########.#.#######.#
#.#.#...#.#.....#...#...#.....#.#...#.#.#.#.#.#.#.....#...#...#.......#.........#
#.#.#.#.#.#.###Z#.###.#.###.###.#.###.#.#.#.#.#.#.###.###.###.#.#######.#####.###
#.#.#.#.#...#.....#...#...#.#...#.#...#.#.#.#.#...#...#...#.#.#...#...#.#...#...#
###.#.#.#####.#####.#####.###.###.#.###.#.#.#.#########.###.#.#.#.###.#.#.#.###.#
#...#.#.....#.#.#...#...#.....#.........#...#...........#...#.#.#...#...#.#.#...#
#.###.#.#####.#.#.###.#.###.###############.#############.###.#####.#####.#.###.#
#.#...#....k....#.#...#.....#.......#...#.#.......#.....#...#...K.#.#.....#...#.#
#.#.#############.#####.#####.#####.#.#.#.#######.#.###.###.#####.#.#.#######.#.#
#...#.........#...#...#.....#...#.#...#.#.......#...#.........#...#.#.#.....#.#.#
#####.#######.#.###.#.#########.#.#####.#.#.###.#.###########.#.###.#.#.#####.#.#
#.....#.........#...#.#.........#...#...#.#...#.#.#.......#...#...#...#...#...#.#
#.###############B###.#.###########.#.#######.###.#.#####.#####.#.#.#####.#.###.#
#.....#.....#...#...#h#...........#.....#.....#...#.#...#.....#.#.#.....#.#...#w#
#.###.#.###.#.#.###.#####.#######.#####.#.#####.###.#.#.#########.#####.#.###.###
#...#...#...#.#...#.....#.......#...#.#.#.#.....#.#...#...#.....#...#.......#...#
#########.###.###.#####.#####.#####.#.#.#.#.#####.#######.#.###.###.#.#########.#
#.....#...#.....#.....#...#...#.....#.#.#...#.......#...#.#.#.......#...#.....#.#
#.###.#.###.#####.#######.#.###.#####.#.#.#####.#####.#.#.#.#############.###G#.#
#...#...#...#...#.......#.#...#.#...#...#.....#.....#.#...#.......#.......#.#...#
###.#####.###.#.###.###.#.#####.###.#.#######.#####.#.###########.#.#######.###.#
#...#.......#.#...#.#...#.#.....#...#...#...#.....#.#.......#...#.#.#.........#.#
#.###.#######.###.#.#.###.#.#####.#####.#.#.#####.#.#######.#.#.#.#.#.###.#####.#
#.....#...#...#.#.#.#...#.#.#...#.......#.#.......#...#...#...#...#.#.#.#.......#
#.#######.#.###.#.#####.#.#C#.#.#.#######.#########.###.#.#########.#.#.#########
#.......#.#...#.....R...#...#.#.#.#.....#.#.......#...#.#.....#.....#.#.........#
#######.#.###.###############.#.#.###.#.#.#.#####.#.#.#.#.###.#.#.###.###.#####.#
#.....#.#...#...#...........#.#.#.....#.#.#.....#...#..p#.#...#.#.#...#...#...#.#
#.#####.#.#.###.#.#########.#.#.#######.#.###.###########.###.###.#.###.#####.#.#
#.....#.#.#.#q#...#.....#.#.#.#.......#.#.#...#.....#...#...#...#.#...#.#x....#.#
#.###.#.#.#.#.#######.#.#.#.#.###.#####.#.#####.###.#.#I###.###.#.###.#.#.#####.#
#...#...J.#...........#...#.....#.......#.......#.....#..l..#.....#.....#.......#
#################################################################################
(0,Nothing)
|
+- (10,Nothing)
| |
| +- (89,Just 'I')
| | |
| | `- (3,Just 'l')
| | |
| | `- (10,Nothing)
| | |
| | +- (8,Just 'p')
| | |
| | `- (41,Just 'G')
| | |
| | `- (3,Nothing)
| | |
| | +- (118,Just 'w')
| | |
| | `- (60,Just 'x')
| |
| `- (63,Just 'K')
|
`- (12,Just 't')
(0,Nothing)
|
`- (16,Nothing)
|
+- (34,Just 'z')
| |
| `- (38,Just 'i')
| |
| `- (90,Nothing)
| |
| +- (9,Just 'Q')
| |
| `- (52,Just 'd')
| |
| `- (26,Just 'v')
| |
| `- (41,Just 'U')
| |
| `- (22,Just 'F')
| |
| `- (18,Just 'A')
| |
| `- (7,Nothing)
| |
| +- (29,Just 'M')
| | |
| | `- (13,Just 'c')
| |
| `- (2,Just 'y')
|
`- (9,Just 'T')
|
`- (18,Just 'S')
(0,Nothing)
|
`- (24,Nothing)
|
+- (6,Just 's')
| |
| `- (27,Just 'Z')
| |
| `- (9,Just 'k')
|
`- (128,Nothing)
|
+- (15,Just 'J')
| |
| `- (15,Just 'q')
|
`- (51,Just 'R')
|
`- (184,Just 'C')
|
`- (24,Just 'B')
|
`- (11,Just 'h')
(0,Nothing)
|
`- (106,Nothing)
|
+- (38,Just 'g')
| |
| `- (18,Just 'j')
|
`- (9,Just 'L')
|
`- (22,Just 'P')
|
`- (59,Just 'r')
|
`- (20,Nothing)
|
+- (11,Just 'X')
|
`- (27,Just 'D')
|
`- (20,Just 'V')
|
`- (13,Nothing)
|
+- (16,Just 'u')
| |
| `- (10,Nothing)
| |
| +- (8,Just 'f')
| |
| `- (20,Just 'a')
| |
| `- (33,Just 'Y')
| |
| `- (9,Just 'm')
| |
| `- (40,Just 'b')
| |
| `- (27,Just 'H')
| |
| `- (5,Just 'e')
| |
| `- (13,Just 'E')
| |
| `- (9,Just 'n')
| |
| `- (11,Just 'N')
| |
| `- (9,Just 'o')
| |
| `- (9,Just 'O')
|
`- (1,Just 'W')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment