Compare commits

..
13 Commits
56 changed files with 17138 additions and 0 deletions

No files matched your search

+1
View File
@@ -1 +1,2 @@
AoC2021/Bene/
__pycache__
+141
View File
@@ -0,0 +1,141 @@
--- Day 16: Reindeer Maze ---
It's time again for the Reindeer Olympics! This year, the big event is the Reindeer Maze, where the Reindeer compete for the lowest score.
You and The Historians arrive to search for the Chief right as the event is about to start. It wouldn't hurt to watch a little, right?
The Reindeer start on the Start Tile (marked S) facing East and need to reach the End Tile (marked E). They can move forward one tile at a time (increasing their score by 1 point), but never into a wall (#). They can also rotate clockwise or counterclockwise 90 degrees at a time (increasing their score by 1000 points).
To figure out the best place to sit, you start by grabbing a map (your puzzle input) from a nearby kiosk. For example:
###############
#.......#....E#
#.#.###.#.###.#
#.....#.#...#.#
#.###.#####.#.#
#.#.#.......#.#
#.#.#####.###.#
#...........#.#
###.#.#####.#.#
#...#.....#.#.#
#.#.#.###.#.#.#
#.....#...#.#.#
#.###.#.#.#.#.#
#S..#.....#...#
###############
There are many paths through this maze, but taking any of the best paths would incur a score of only 7036. This can be achieved by taking a total of 36 steps forward and turning 90 degrees a total of 7 times:
###############
#.......#....E#
#.#.###.#.###^#
#.....#.#...#^#
#.###.#####.#^#
#.#.#.......#^#
#.#.#####.###^#
#..>>>>>>>>v#^#
###^#.#####v#^#
#>>^#.....#v#^#
#^#.#.###.#v#^#
#^....#...#v#^#
#^###.#.#.#v#^#
#S..#.....#>>^#
###############
Here's a second example:
#################
#...#...#...#..E#
#.#.#.#.#.#.#.#.#
#.#.#.#...#...#.#
#.#.#.#.###.#.#.#
#...#.#.#.....#.#
#.#.#.#.#.#####.#
#.#...#.#.#.....#
#.#.#####.#.###.#
#.#.#.......#...#
#.#.###.#####.###
#.#.#...#.....#.#
#.#.#.#####.###.#
#.#.#.........#.#
#.#.#.#########.#
#S#.............#
#################
In this maze, the best paths cost 11048 points; following one such path would look like this:
#################
#...#...#...#..E#
#.#.#.#.#.#.#.#^#
#.#.#.#...#...#^#
#.#.#.#.###.#.#^#
#>>v#.#.#.....#^#
#^#v#.#.#.#####^#
#^#v..#.#.#>>>>^#
#^#v#####.#^###.#
#^#v#..>>>>^#...#
#^#v###^#####.###
#^#v#>>^#.....#.#
#^#v#^#####.###.#
#^#v#^........#.#
#^#v#^#########.#
#S#>>^..........#
#################
Note that the path shown above includes one 90 degree turn as the very first move, rotating the Reindeer from facing East to facing North.
Analyze your map carefully. What is the lowest score a Reindeer could possibly get?
Your puzzle answer was 143564.
--- Part Two ---
Now that you know what the best paths look like, you can figure out the best spot to sit.
Every non-wall tile (S, ., or E) is equipped with places to sit along the edges of the tile. While determining which of these tiles would be the best spot to sit depends on a whole bunch of factors (how comfortable the seats are, how far away the bathrooms are, whether there's a pillar blocking your view, etc.), the most important factor is whether the tile is on one of the best paths through the maze. If you sit somewhere else, you'd miss all the action!
So, you'll need to determine which tiles are part of any best path through the maze, including the S and E tiles.
In the first example, there are 45 tiles (marked O) that are part of at least one of the various best paths through the maze:
###############
#.......#....O#
#.#.###.#.###O#
#.....#.#...#O#
#.###.#####.#O#
#.#.#.......#O#
#.#.#####.###O#
#..OOOOOOOOO#O#
###O#O#####O#O#
#OOO#O....#O#O#
#O#O#O###.#O#O#
#OOOOO#...#O#O#
#O###.#.#.#O#O#
#O..#.....#OOO#
###############
In the second example, there are 64 tiles that are part of at least one of the best paths:
#################
#...#...#...#..O#
#.#.#.#.#.#.#.#O#
#.#.#.#...#...#O#
#.#.#.#.###.#.#O#
#OOO#.#.#.....#O#
#O#O#.#.#.#####O#
#O#O..#.#.#OOOOO#
#O#O#####.#O###O#
#O#O#..OOOOO#OOO#
#O#O###O#####O###
#O#O#OOO#..OOO#.#
#O#O#O#####O###.#
#O#O#OOOOOOO..#.#
#O#O#O#########.#
#O#OOO..........#
#################
Analyze your map further. How many tiles are part of at least one of the best paths through the maze?
Your puzzle answer was 593.
Both parts of this puzzle are complete! They provide two gold stars: **
+75
View File
@@ -0,0 +1,75 @@
#!/usr/bin/env python3
import sys, math
import numpy as np
def dijkstra(graph, v, a):
Q = [n for n in graph.keys()]
lq = len(Q)
while len(Q) > 0:
u = min([u for u in Q], key=lambda x: a[x])
Q.remove(u)
for vo in graph[u]:
if vo in Q:
distance_update(graph, u,vo,a,v)
return v, a
def distance_update(g, u, vo, a, v):
dist = 1 if vo[2] == u[2] else 1000
alt = a[u] + dist
# joining the sets does not work because we never remove the older nodes!
if alt <= a[vo]:
if alt < a[vo]:
v[vo] = set([])
a[vo] = alt
v[vo].add(u)
v[vo] = v[vo].union(set(v[u]))
def count_set(edges, lab):
edg = set([])
for e in edges:
edg.add((e[0], e[1]))
lab[e[1]][e[0]] = 'O'
return edg
if __name__ == '__main__':
lab = [list(line.strip('\n')) for line in open(sys.argv[1])]
rot90 = {(0,-1): [(-1,0),(1,0)], (1,0): [(0,-1),(0,1)], (0,1): [(1,0),(-1, 0)], (-1,0): [(0,1),(0,-1)]}
start = (1, len(lab)-2, (1,0))
end = (len(lab[0])-2, 1, (0,-1))
graph = {}
distance = {}
pred = {}
for y, l in enumerate(lab):
for x, f in enumerate(lab[y]):
if f == '#': continue
for d in [(0,1), (0,-1), (1,0), (-1,0)]:
distance[(x,y,d)] = math.inf
pred[(x,y,d)] = set([])
graph[(x,y,d)] = []
for d1 in rot90[d]:
if not lab[y+d1[1]][x+d1[0]] == '#': graph[(x,y,d)].append((x,y,d1))
if lab[y+d[1]][x+d[0]] != '#':
graph[(x,y,d)].append((x+d[0], y+d[1], d))
distance[start] = 0
v1, a1 = dijkstra(graph, pred, distance)
d1 = count_set(v1[end], lab)
# challenge 1
res1 = a1[end]
print(f"challenge 1:\n{res1}\n")
# challenge 2, needed some reddit help again...
d1.add((end[0],end[1]))
d1.add((start[0], start[1]))
res2 = len(d1)
print(f"challenge 2:\n{res2}")
for line in lab:
print(''.join(line))
+15
View File
@@ -0,0 +1,15 @@
###############
#.......#....E#
#.#.###.#.###.#
#.....#.#...#.#
#.###.#####.#.#
#.#.#.......#.#
#.#.#####.###.#
#...........#.#
###.#.#####.#.#
#...#.....#.#.#
#.#.#.###.#.#.#
#.....#...#.#.#
#.###.#.#.#.#.#
#S..#.....#...#
###############
+17
View File
@@ -0,0 +1,17 @@
#################
#...#...#...#..E#
#.#.#.#.#.#.#.#.#
#.#.#.#...#...#.#
#.#.#.#.###.#.#.#
#...#.#.#.....#.#
#.#.#.#.#.#####.#
#.#...#.#.#.....#
#.#.#####.#.###.#
#.#.#.......#...#
#.#.###.#####.###
#.#.#...#.....#.#
#.#.#.#####.###.#
#.#.#.........#.#
#.#.#.#########.#
#S#.............#
#################
+141
View File
@@ -0,0 +1,141 @@
#############################################################################################################################################
#...#.....#.......#...........#...#.............#.......#.........#.....................#.............#.........#.....#.......#.........#..E#
#.#.#.#.###.#.###.#####.#.#.#.#.#.#.###.#######.#######.#.#####.###.#.#######.###.#.#.#.#.#.###.#####.###.#####.#.###.#.###.#.#######.#.#.#.#
#.#...................#.....#...#.#.#.#.......#.........#.....#.....#.........#...#.#.#.#.#.........#.....#...#...#...#.#...#...#.....#...#.#
###.#.#.#.#####.#####.#.#.#######.#.#.#######.#######.#######.###########.#####.#.###.#.#.#########.#######.#.#.###.#####.#####.#.###.#####.#
#...#.#...#...#.#.#...#...#...#...#...#.....#.....#.#.#...#.............#...#...#.#...#...#.......#.....................#.#.....#...#.....#.#
#.###.#####.#.#.#.#.###.#.###.#.#####.#.###.#####.#.#.#.#.#.#####.#.###.#####.#####.#########.#.#.#####.#.#####.#.###.#.#.#.#######.#.###.#.#
#.....#...#.#.#.#...#...#...#.......#.#...#...#...#...#.#...#...#.#...#.......#.....#.........#...#.....#.....#.#.#...#...#.#.......#...#.#.#
#.#####.###.#.#.#.###.#.###.#.#######.###.#.#.#.#.#####.#####.#.#.###.###.#####.#####.#############.#####.###.#.#.###.#####.###.#####.#.#.#.#
#.......#...#...#...#...#...#.#.....#.....#...#.#.#.....#.....#...#...#...#...#.....#...#...........#.#...#.#...#...#...#.....#...#.....#...#
#####.###.#####.###.###.#.#.###.###.#######.###.#.#.#########.#.###.#######.#.#####.###.#.###########.#.###.###.###.#.#.#####.###.#.#.#.###.#
#...#.#...#.......#.......#.#...#...#.....#.#.#.#.#...#...#...#.#...#.....#.#.........#.#.....#.........#.....#.....#.#.....#.....#.#.#.#...#
#.###.#.###.###.###########.#.###.#.#.#.#.#.#.#.#####.#.#.#.###.#.#.#.###.#.#########.#.#####.#.#####.###.###.#######.#####.#######.#.#.#.###
#.....#.#.......#.......................#.#.....................#.#.#...#...#.......#.......#.#.#...#.#...#.#.#.#.........#.#.....#.#.#.#...#
#.#####.#.#####.#.#.#.#######.#.#.#.#.#.#.#.#.###.#######.#####.#.#####.#####.###.#.#######.#.###.#.#.###.#.#.#.#.#########.#.###.###.#.###.#
#.....#.#.....#...#.#.#.........#.#.#.#.....#...#.........#...#.#.........#...#.....#...#...#.#...#.#...#.#.#.#...#.....#...#...#...#.......#
#######.#####.#####.#.#####.###.#.###.###.#.#.#####.#######.#.###########.#.###.#####.###.###.#.###.###.#.#.#.#####.###.#.###.#.###.#.###.###
#.......#...#.#...#...#...#...#.#.....#...#...#...#.......#.#.#.......#...#.#.#.#...#.....#.#...#.#.#.#...#...#.....#...#.#...#.#.#...#...#.#
#.#######.#.#.###.#####.#.#.#.#.#######.#######.#.#.#######.#.#.#####.###.#.#.#.#.#.#.#####.#.#.#.#.#.#####.###.#.###.###.#.###.#.###.#.###.#
#...#...#.#.............#.#...#...#.....#...#...#...#.........#...#.#...#.#.#.....#.#.......#.....#.#.....#.....#...#.#...#...#.#.....#.....#
###.#.#.#.#########.#.###.###.###.###.###.#.#.#.###.#.#######.###.#.###.###.#.###.#.#######.#######.#.###.#######.#.#.#.#######.#.#########.#
#...#.#...#...#.......#.........#...#.#...#.#.....#...#.....#...#.#.........#.....#.............#...#...#.#.....#.#.....#.......#.........#.#
#.#####.###.#.###############.#####.#.#.###.#####.#######.#####.#.#####################.#########.#####.#.#.#####.#####.#.#.###.#######.###.#
#.#...#.#...#.......#.....#.......#...#...#.......#.......#.....#.#...#.....#.........#...........#.....#.#.#.....#.....#.#...#.........#...#
#.#.#.###.#########.#.###.#.###.###.#.###.#.#######.#.#####.###.#.#.#.###.#.#.#####.#.#.#########.#.#.#.#.#.#.#####.#.#####.#.#.#####.###.###
#...#...#.#.....#.#.#...#...#.#.......#.....#.....#.#.....#...#.....#...#.#.#.#...#.#.#.............#...#...#.#...#.#.#...#.#.......#.#...#.#
#.#####.#.#.###.#.#.###.#####.#########.#####.###.###.#.#.###.#.#######.#.###.#.#.#.###.#############.#.#.#.#.#.###.#.#.#.#######.#.###.###.#
#.#...#.....#.....#.....#.....#.......#.....#...#...#...#...#.#.....#...#.......#.#.#...#...#.......#.#.#.#...#.#...#...#.#.....#.#.#...#...#
#.#.#.#.#########.###########.#.###.#######.###.###.#######.#.###.###.#############.#.#####.#.#####.###.#.#.###.#.#######.#.###.#.#.#.###.#.#
#.#.#.#...#...#.#.....#.....#...#.#.#.....#...#.#.#.#.......#...#.#...#.........#...#.......#.#...#...#.#.#.#...#.#.....#.#.#...#.#...#...#.#
#.#.#.#.###.#.#.#####.###.#.#.###.#.#.###.#.#.#.#.#.#.#####.###.#.#.###.#######.#.#######.###.#.#.###.#.#.#.#.#.#.#.###.#.#.#.###.#####.###.#
#.#.#.#.#...#.#.#...#.#...#.#.#...#.....#...#.....#.#.....#.#.#.#.#.#.......#...#.......#.#...#.#...#.#.#.#.#.#...#.#...#...#...#.#.....#...#
###.#.###.###.#.#.#.#.#.###.#.#.#.#########.#######.#.###.#.#.#.###.#######.#.#######.###.#.#####.###.#.###.#.###.#.###.#######.#.#.#######.#
#...#.....#.#.#.#.#...#.#...#.#.#...#.......#.......#...#.....#.....#...#.....#.......#...#.#.....#...#.#...#.....#...#.........#.#...#...#.#
#.#########.#.#.#.#####.###.#.###.#.#.#####.#.#########.#.#########.#.#.#.###.#.#######.###.#.#.###.#.#.#.#########.#.#########.#.###.#.#.#.#
#...#.......#.#.#.#.......#.#...#.#...#.....#...........#.#...#.............#.#.#.......#.#.#.#...#...#.#.#.......#.#...#.......#.....#.#.#.#
###.#.#####.#.#.#.#######.#.###.#.#.#####.###########.#.###.#.#.#####.#####.#.#.#.#######.#.###.#.###.#.#.###.###.#.###.#.#####.#.#####.#.#.#
#...#.....#...#.......#...#...#...#.#...#...#...#.....#.....#.#.#...#.#...#.....#.........#...#.#...#...#.....#.#.#.#.#.#.#.#...#.#.....#.#.#
#.#######.###########.#.#.###.###.#.#.#.###.#.#.#.#.#######.#.#.#.#.#.###.#.#######.#####.###.#.###.###.#####.#.#.#.#.#.#.#.#.#.###.#####.#.#
#.#.......#.........#...#...#...#.#...#...#.#.#...#.#.....#.#.......#...#.#...#.....#...#.#.#.#...#...#.#.......#.#...#...#.#.#.......#...#.#
#.#.#########.###.#.#######.###.#########.#.#.#####.#.#.#.#####.#.###.#.#.#.###.###.#.#.#.#.#.#####.#.#.#.#####.#.#######.#.#.#.#######.###.#
#.#.#.........#...#...#.....#...#.........#.#.#.....#.#.#.....#.#...........#...#.....#.#...#.....#.#.#.#.#...#.#.#.....#...#.#.....#...#.#.#
#.#.###.#########.###.#.#.###.###.###.#####.#.###.###.#.#####.###.#####.#.###.###.#####.#.#######.#.###.#.#.#.#.#.#.###.#####.#.###.#.###.#.#
#.#.....#.#.........#.#.........#.#...#.....#.....#...#.....#...#.#...#.#...#.#...#.....#.#.......#...#.#...#.#.#...#...#...#.......#.#...#.#
#.#######.#.#.#.#.###.#.#######.#.#.###.#####.#.#.#.#######.###.#.#.###.#.#.#.#.###.#######.#######.#.#.#####.#.#####.###.#.###.#####.#.###.#
#.............#.#.#...#.#.....#...#.....#...#.#.#.#.#...#.........#.....#.#...#...#.......#...#.....#.......#.#.#...#.......#.........#.....#
#.#.#.#.#####.#.#.#.###.#.###.#####.#####.#.#.#.#.#.#.###.#.#######.###.#.#.#####.#######.#.#.###########.#.#.#.#.#.###.###.#.#.#.#####.#####
#.#.#.#.#...#.#.#.#.#...#.#...#.....#...#.#.#.#.#.#.#...#.......#.#.....#...#...#...#...#.#.#...........#.....#...#...#...#.#.#.#.....#.#...#
#.#.#.#.#.#.#.#.#.#.#.###.#.###.#####.#.#.#.#.#.#.#.###.#######.#.#####.###.#.#####.###.#.#####.#######.###.#######.#.###.#.#.#.#####.#.#.#.#
#.....#...#...#...#.#...#.#...#...#...#...#...#.#.#...#.......#.....#.....#.#.....#...#.......#.#.....#...#...#.....#.....#.#.#.#.....#...#.#
#.#.#.#.#####.###.#.###.#.###.###.###.###.###.#.#####.#.#.###.#.###.#.###.#.###.#####.#######.#.#.###.###.#.#.#.###.#.#.#.#.#.#.#.#########.#
#.#.#.#.#...#.....#...#.#.#.#.#.......#...#...#.#.....#.#...#.#...#.....#.......#...#.......#.#.#...#.....#.#...#...#...#.#...#...#.........#
#.#.#.###.#.#.###.###.###.#.#.#.#######.###.###.#.#####.#.#.#.###.###.###.#######.#.#######.#.###.#.#.#####.#.#.#.#######.#####.###.#########
#.#.#.#...#...#...#...#...#...#.#...#...#...#.....#.....#...#...#...#.#...#.......#.........#...#.#.#.#...#.#...#.......#...#.....#.#.....#.#
#.###.#.#.###.#.###.###.###.#####.#.###.#.#######.#####.#.###.#####.###.###.###################.###.###.#.#.###########.###.#.#.#.#.#.#.#.#.#
#...#...#...#.#.#...#.....#.......#...#.#.......#.....#.#.#...#...#.....#...#...#...........#.....#.#...#.#...........#.....#.#.#...#.#.#.#.#
###.#####.#.#.#.#.#.#.###.###########.#.#######.#####.###.#####.#.#######.###.#.#.#####.#.#.#.###.#.#.###.###.#######.#######.#.#######.#.#.#
#...#...#.#.#.#...#.#...#.#.......#...#...#.....#...#.....#...#.#.....#...#...#...#...#.#.#...#...#.#...#.#...#.....#.#.....#.#.........#.#.#
#.###.#.#.#.#.###.#.###.#.#.#####.#.#####.#.#######.###.#.#.#.#.#####.#.###.#########.#.#.#####.###.#.###.#####.###.###.###.#.#.#########.#.#
#.#...#.#.#...#.....#.#.#.#.#...#.#.......#.......#.#...#...#.....#...#.#.....#.......#.#.#...#.#.....#...#.....#.#.....#.#...#.............#
#.#.#.#.#.###.#.#####.#.#.#.###.#.#######.#.#####.#.#.#####.#######.###.#####.#.#####.#.#.#.#.#.#######.###.#####.#######.#######.###.#.###.#
#...#.#...#...#.#.......#.#...#.....#...#.#.....#.#.#.#...#.......#...#.....#.#.#...#.#...#.#...#.....#...#.#.#.......#.........#.#...#.....#
#.###.###.#.#.#.#########.###.#.#####.#.#.#######.#.#.#.#.#.#####.#.#.#####.#.#.#.#.#.#.###.#####.###.###.#.#.#.###.###.#.#.###.#.#.###.#####
#.#...#...#.#.............#...#.#.....#...#.......#.#...#...#...#.#.#.#.....#.#.#.#.#.#.....#.#...#.#.....#.#.#.#.#.....#...#.#.#.#.#.#...#.#
#.#.###.#.#.#.###.#.#.#####.#####.#######.#.#######.#########.###.#.#.#.#####.#.#.#.###.#.###.#.#.#.#####.#.#.#.#.###.###.###.#.#.#.#.###.#.#
#.#...#.#...#...#...#.#...#.........#...#...#.#.............#...#...#.#.#.....#...#.....#...#...#.#.....#.#.#.....#...#...#.#...#.#.#.....#.#
#.###.#######.#.#.#.###.#.###########.#.#####.#.#########.###.#.###.#.#.###.###.#####.#####.###.#.#.###.#.#.#######.#.#.###.#.###.#.#.#####.#
#.....#.......#...#.....#.#...........#.#...#...#.....#.#...#.#.....#.#...#...#.#...#.#...#...#.#.#...#...#.#.....#.#.#.#...#.......#.#.....#
#.#.###.#######.#########.#.#####.#####.#.#.#.###.###.#.###.#.#######.###.###.#.#.#.#.###.###.###.###.#####.#.###.#.#.#.#.###.#.#####.#.#####
#.#.....#.....#.#.#.....#...#...#...#...#.#.#.#...#.#...#.#.#.........#...#...#.#.#.#.#.....#.#...#.#.#.....#...#...#.#.#.....#...#...#.....#
#.#.#######.#.#.#.#.###.###.#.#.#####.###.#.#.###.#.###.#.#.#########.#.###.###.#.#.#.#.#####.#.###.#.#.#####.#.#####.#.#####.#.#.#.#######.#
#.#.......#.#...#.#.#.#...#.#.#...#.......#.....#.#.....#.#.....#.....#.#.....#.#.#.#...#.....#.#.....#.#...#.#...#.#.......#.#.#.#.........#
#.#######.#.#####.#.#.###.#.#.###.#.#######.###.#.###.###.#####.#.#######.###.###.#.###.#.#####.#.#####.#.###.###.#.#.#####.###.#.#########.#
#...#.#...#...#...#.#...#.#.#.#...#.#.....#...#.#...#.....#.....#.......#.#...#.......#.#...#...#.#.....#.......#.#.#.......#...#.#...#...#.#
#.#.#.#.#####.#.#.#.#.###.###.#.#.#.#.###.###.#.#.#.#####.#.#.#########.#.#.###.#####.#.###.#.#####.#########.###.#.#.#.###.#.#.#.#.#.#.#.#.#
#.#.#.#...#.....#.#.#...#.....#.#...#...#.....#.#.#...#...#.#.#.........#.....#.#.#...#.#.#.#.......#.......#.#...#.#.#.#...#.#.#.#.#.#.#...#
###.#.###.#######.#.#.#.#######.###.###.#######.#.###.#####.###.#.###.#.#.###.#.#.#.###.#.#.#####.###.#####.###.###.#.#.###.#.#.#.#.###.#####
#...#...#.......#...#.#.......#...#...#.........#...#.....#.....#...#.#.#...#.#...#.#.#...#.....#.#.....#.......#.....#...#.#.#...#...#...#.#
#.#####.#######.#.###.#####.#####.###.#.#####.###.#######.#########.#.#.#####.#.###.#.#.#######.#.###.#.#########.#######.#.#.#.#.###.###.#.#
#.#...#.......#.#...#.#...#.#...#.....#.#.........#.......#...#...#.#.#.....#...#...#...#.....#.#...#.#...#.............#.#.........#.....#.#
#.#.#.#.###.#.#.#.#.#.#.#.#.#.#.###.###.###########.#####.#.#.#.###.#.#####.#####.###.###.###.#.###.#.###.#############.#.###.#.#.#.#.#####.#
#.#.#.#.#...#.#.#.#.#.#.#...#.#.......#.#...........#.....#.#...#...#.#...#.....#.#.#...#.#.#...#.#.#.#...#.......#.......#...#...#.#.#...#.#
#.#.#.#.#.#####.#.#.###.###.#.#######.#.#.#.#########.#####.#####.###.###.#####.#.#.###.#.#.#####.#.###.###.#####.#########.#####.#.#.#.#.#.#
#...#.#.#.......#.#...#...#.#.#.....#.....#.#...#...........#.....#.#.........#...#...#.#.#...#...#.#...#...#.#...#.......#.#.#...#.#...#...#
#.#.#.#.#.#########.#.###.###.#####.#########.#.#.#########.#.#####.#####.###########.#.#.#.#.#.#.#.#.#.#.###.#.###.#####.#.#.#.#.#.#####.#.#
#...#...#.#.......#.#...#.#...#...#.....#.............#.....#...#.#.......#...........#.#.#.#.#.#.#...#...#...#.#...#...#.#.#.......#.......#
#.#.###.#.###.###.#####.#.#.###.#.#.#####.###########.###.#.###.#.#.#######.###.#######.#.#.#.#.#.#####.#.#.###.#.###.#.#.#.###.#.#.#######.#
#.#...#.#...#...#.......#...#...#.#.....#...#...#.....#...#.#.#.......#.....#.#.....#.....#.#.#.#...#.....#.....#.#...#...#...#.#.#.#.....#.#
#.###.#.###.###.#########.###.###.#####.###.#.#.#.#.#.#.###.#.#.#.#####.#####.#####.#.###.#.#.#.###.#.#.#.#.#####.#####.#####.###.#.#.###.###
#...............#.#.....#.#...#...#.......#...#.#.#.#.#.......#.#.#.....#.........#...#.#.#.#.#.........#.#.....#.....#.......#...#.#.#.#...#
#.#####.#.#######.#.###.#.#.#.###.#.#.#.#.#####.#.#.#.#####.#.#.###.#####.###.#.#.#####.#.#.#####.#######.#####.#.###.#########.#.#.#.#.###.#
#.#...#...#.....#...#.#...#.#...#.#.#.#.......#.#.#.#.#...#...#.....#...#...#.#.#.#.......#.........#...#.#.....#...#.......#...#.#.#.#.#...#
#.#.#.#.###.#.###.###.#########.#.#.#.#.#.#####.#.###.#.#.###.#######.#####.#.#.#.#####.#.#.#########.#.#.###.#########.###.#.#.###.#.#.#.#.#
#.#.#.#...#.#.#...#.....#.......#...#...#.#.....#...#.#.#.#.#.#.....#.#.....#.#.......#.#.#.#...#.....#.#...#...#.....#...#.#.#...#...#.#...#
#.#.#.#.#.###.#.#####.#.###.#############.#.#####.#.#.#.#.#.#.#.###.#.#.#.###.#.#####.#.#.###.#.#.#####.###.#.#.#.###.#####.#.###.#####.###.#
#.#.#...#...#.........#.....#.....#.....#.#.#.....#.#...#.#.#...#.....#.#.#...#.......#.#.....#...#...#.....#.#...#.#.....#.#...#.........#.#
#.###.#.###.#.###.#.#########.###.#.#####.#.#.#####.#####.#.#.#.#######.#.#.###.#######.###########.#.#######.#####.#####.#.###.#########.#.#
#...#.#.#...#.#...#...#.........#.#.......#.#.#...#.......#.#.#.#.....#.#.#.#.#.......#...........#.#.#.#.......#.......#.#.#...#.......#.#.#
#.#.#.#.#.###.#####.#.#.#########.#.###.###.###.#.###.###.#.#.#.#.###.#.#.#.#.#######.#.#########.#.#.#.#.#.#####.#.###.#.#.#.###.#####.#.#.#
#.#.#.#.#.#.......#.#.....#.......#.......#.....#.#...#...#.#.#...#...#...#.#...........#.......#.#.#...#.#.......#.#...#.#.#...#.....#.#...#
#.#.###.#.#######.#########.#.#####.#######.#####.#.#.#.###.#.#.###.###.###.#.###########.#.#.#.#.#.#.###.###.#.###.#.###.#.###.#####.#.#####
#.#.#...#.....#.......#.....#...#...#.......#...#...#.#.#.#...#.#.#.....#.....#.#...........#.......#.........#.#...#...#.#.#...#.....#.#...#
#.#.#.#.#####.#######.#.#####.#.#####.#.#.###.#.#####.#.#.#.###.#.#######.###.#.#.###########.#######.#####.#.#.#.#.#.#.#.#.#.###.#######.#.#
#.#.#.......#.....#.....#.....#.....#.#.....#.#...#...#.#...#.#.....#.#...#.....#...#.....#...#.....#.#.....#.#...#.....#...#...#.#.......#.#
#.#.#.###.#.###.#.#######.#########.#.#######.###.#####.#.###.#####.#.#.###########.#####.#.###.###.#.#.###.#.###.#.###.#######.#.#.#######.#
#...#.#.#.#.#...#.#...#...#.#.....#...#...#...#.#...#...#.#...#.....#.#.#...........#.....#...#.#.#...#.#...#.....#...#...#...#.#.#.#.....#.#
#.###.#.#.###.#.#.#.#.#.###.#.###.#####.###.###.###.#.###.#.###.#####.#.#.#########.#.#####.#.#.#.#####.#.#####.#####.###.#.###.#.#.#.###.#.#
#...#.#.#...#.#.#...#...#.....#.#.....#...#.#.....#.#.#.#.#.........#.#.......#...#...#...#.#.#.#...#...#...#...#...#.#.....#...#...#.#...#.#
###.#.#.###.#.#.###########.###.#####.#.#.#.#.#.###.#.#.#.#########.#.#########.#.#.###.#.###.#.#.#.###.###.#.#####.#.#######.###.#####.#.#.#
#...#.#...#...#.....#.....#.........#...#.#.#.#.......#...#.......#...#.........#.#.#...#...#.#.#.#.....#.#...#.....#.......#.#.#.#...#.#.#.#
#.#.#.###.#####.###.###.#.#####.#########.#.###########.###.#####.###.#.#########.###.#####.#.#.#.#####.#.#####.###.#####.#.#.#.#.#.#.#.###.#
#...#.....#...#.#.#.#...#.#.#...#.........#.#.......#.....#.#.....#...#...#...........#.......#...#...#.........#.#.....#...#.#.....#...#...#
#.#.#####.#.#.#.#.#.#.###.#.#.###.#######.#.#.#####.#####.#.#.#####.#####.#.###.#######.#######.#.###.###########.#.###.#.###.###########.#.#
#...#.....#.#.#.#.#...#...#.#.#...#...#.#.#.#.#...#.....#...#.#...#.#.....#.....#...#...#.......#...#.......#.......#...#.....#...#.....#.#.#
###.###.###.#.#.#.#####.###.#.#.###.#.#.#.#.#.#.###.#.#.#####.#.#.#.#.#.#####.#.#.#.#####.#########.#.#####.#.#####.#.#########.#.#.###.#.#.#
#.#...#.#.#.#...#.....#.#.....#.....#...#.#.....#...#.#...#.......#.#.#.#.....#.#.#.......#.#.......#.....#.#.#...#.#.#...#.....#...#.#.#.#.#
#.#.#.#.#.#.#####.#.###.#######.#.#.#.#.#.#####.#.#.#.###.#######.#.#.###.#####.#.#########.#.###.#######.#.#.###.#.#.#.#.###.#######.#.#.#.#
#.....#...#.....#.#.#...#.....#.#.#.#...#.......#.#.#...#...#...#.#.#.#.....#...#.......#...#.#.#.....#...#.#.....#...#.#...#.....#.......#.#
#.#.#####.#####.#.###.###.###.#.#.#.#########.###.#.#######.#.#.#.###.#.#####.#########.#.###.#.#####.#.###.#.#.#######.###.#.###.#########.#
#.....#...#...#.#...#.#.....#.....#.......#...#...#.........#.#.#...#.#.#.#...#.......#.#...#.......#.#...#.#.#.........#.#.#.#.#.....#.....#
#####.###.###.#.###.#.#.###.#####.#####.###.###.#############.#####.#.#.#.#.###.#.#####.#.#.###.#####.#####.#.#####.#.###.#.#.#.#####.###.###
#...#...#.....#.....#.#.#...#...#.....#...#.#...#.....#...........#.#.#...........#...#.#.#.....#.....#.....#.....#.#.#.....#...#...#...#...#
#.#.###.#########.#.#.###.###.###.###.###.#.#.#####.#.#.#########.#.#.###.#######.#.#.#.#.#######.###.#.#.#.###.#.###.#.#####.###.#.#.#.###.#
#.#...#...........#.#.#...#.......#.....#.#.#.....#.#.#...#...#.#.#.#.#...#.....#.#.#...#.......#.#...#.#.#.....#.....#.#...#.#...#.#.#.#.#.#
#.#.###############.#.#.###.#######.###.#.#.#####.#.#####.#.#.#.#.#.#.#.#.#.###.#.#.#####.###.###.#.###.#.#.###.#######.#.#.#.#.###.###.#.#.#
#.#.#.......#.....#...#...#.......#...#...#.......#.....#...#...#.....#.#...#...#.#.......#.#.#...#.#...#.#...#.#.....#.....#.#.............#
#.###.###.###.###.#.#####.#######.#.#.#########.#.#.#.###.###.#.#######.#.#.#.###.#######.#.#.#.#####.###.###.###.#.#######.#.#.#########.#.#
#...#.#.#.......#.#.#...#...#...#...#.......#...#.#.#.......#.#.#.......#.#.#.#...#...#...#...#...#.....#.#...#...#.......#.#.#.....#...#...#
#.#.#.#.#########.#.#.#.###.#.#####.#######.#.###.#.#.#.#.#.#.#.#.#######.#.#.#.###.#.#.#########.#.#####.#.#.#.#####.#####.#.#####.#.#.#.###
#.#.#.....#...#...................#.....#.#.#.#.#.#...#.#.#...#.#...#.....#.#.#.....#...#.......#.....#...#.#.#.#...................#.#.#...#
#.#.#####.#.###.#.###.#######.#.#.#####.#.#.#.#.#.#.#.#.#.#.###.###.#######.#.#############.###.#######.###.#.#.###.#.#.#.#.#####.#####.###.#
#.#.........#...#.#...#.......#.#.....#...#.#...#.#.#...#...#...#...#.......#.........#...#.#...........#...#.#.....#.#.#...#...#.#.....#...#
#.###########.###.#.#.#.###.###.#.#.#####.#.###.#.###.###.###.###.###.#######.#######.#.#.#.#############.#####.#####.#.#####.#.#.#.#.###.###
#...#...#.#...#...#.#.#...#.#...#.#.#.....#.#...#...#...........#.....#.......#...#...#.#.#...#...........#.....#.....#.#.....#...#.#...#.#.#
###.#.#.#.#.###.###.#.###.#.#.###.#.#.#####.#.#####.#.###.#############.#.#.###.#.#.###.#.###.#######.#####.#####.###.#.#.###.#####.###.#.#.#
#.#...#...#.#.#.#...#.#...#...#...#.#.....#.#...#.#.#...#...#.....#.....#.#.#...#.#.....#...#.......#.#.....#...#.#...#.#...#.#...#.#.#.#...#
#.#####.###.#.#.#.###.#.#######.#.###.#####.###.#.#.#####.#.#.#.###.#####.#.#.###.#########.#.#####.#.#.#####.###.#.###.###.#.#.#.#.#.#.###.#
#.....#.#...#...#.#.#...#.....#...#...#.................#.#...........................#...#.#.#.....#.#.#.....#...#.#...#...#.#.#.#.#.#.....#
#.###.#.#.#######.#.#######.#.###.#.###.#########.#.#.#.#.#######.###.#.###.###.#####.#.#.#.#.#.#####.#.#####.#.#####.#######.#.#.#.#.#######
#S..#...#...................#...#.....#...........#...#.........#.....#.............#...#.......#.............#...............#.#...........#
#############################################################################################################################################
+141
View File
@@ -0,0 +1,141 @@
#############################################################################################################################################
#...#.....#.......#...........#...#.............#.......#.........#.....................#.............#.........#.....#.......#.........#..E#
#.#.#.#.###.#.###.#####.#.#.#.#.#.#.###.#######.#######.#.#####.###.#.#######.###.#.#.#.#.#.###.#####.###.#####.#.###.#.###.#.#######.#.#.#O#
#.#...................#.....#...#.#.#.#.......#.........#.....#.....#.........#...#.#.#.#.#.........#.....#...#...#...#.#...#...#.....#...#O#
###.#.#.#.#####.#####.#.#.#######.#.#.#######.#######.#######.###########.#####.#.###.#.#.#########.#######.#.#.###.#####.#####.#.###.#####O#
#...#.#...#...#.#.#...#...#...#...#...#.....#.....#.#.#...#.............#...#...#.#...#...#.......#.....................#.#.....#...#OOOOO#O#
#.###.#####.#.#.#.#.###.#.###.#.#####.#.###.#####.#.#.#.#.#.#####.#.###.#####.#####.#########.#.#.#####.#.#####.#.###.#.#.#.#######.#O###O#O#
#.....#...#.#.#.#...#...#...#.......#.#...#...#...#...#.#...#...#.#...#.......#.....#.........#...#.....#.....#.#.#...#...#.#.......#O..#O#O#
#.#####.###.#.#.#.###.#.###.#.#######.###.#.#.#.#.#####.#####.#.#.###.###.#####.#####.#############.#####.###.#.#.###.#####.###.#####O#.#O#O#
#.......#...#...#...#...#...#.#.....#.....#...#.#.#.....#.....#...#...#...#...#.....#...#...........#.#...#.#...#...#...#.....#...#..O..#OOO#
#####.###.#####.###.###.#.#.###.###.#######.###.#.#.#########.#.###.#######.#.#####.###.#.###########.#.###.###.###.#.#.#####.###.#.#O#.###.#
#...#.#...#.......#.......#.#...#...#.....#.#.#.#.#...#...#...#.#...#.....#.#.........#.#.....#.........#.....#.....#.#.....#.....#.#O#.#...#
#.###.#.###.###.###########.#.###.#.#.#.#.#.#.#.#####.#.#.#.###.#.#.#.###.#.#########.#.#####.#.#####.###.###.#######.#####.#######.#O#.#.###
#.....#.#.......#.......................#.#.....................#.#.#...#...#.......#.......#.#.#...#.#...#.#.#.#.........#.#.....#.#O#.#...#
#.#####.#.#####.#.#.#.#######.#.#.#.#.#.#.#.#.###.#######.#####.#.#####.#####.###.#.#######.#.###.#.#.###.#.#.#.#.#########.#.###.###O#.###.#
#.....#.#.....#...#.#.#.........#.#.#.#.....#...#.........#...#.#.........#...#.....#...#...#.#...#.#...#.#.#.#...#.....#...#...#...#O......#
#######.#####.#####.#.#####.###.#.###.###.#.#.#####.#######.#.###########.#.###.#####.###.###.#.###.###.#.#.#.#####.###.#.###.#.###.#O###.###
#.......#...#.#...#...#...#...#.#.....#...#...#...#.......#.#.#.......#...#.#.#.#...#.....#.#...#.#.#.#...#...#.....#...#.#...#.#.#..O#...#.#
#.#######.#.#.###.#####.#.#.#.#.#######.#######.#.#.#######.#.#.#####.###.#.#.#.#.#.#.#####.#.#.#.#.#.#####.###.#.###.###.#.###.#.###O#.###.#
#...#...#.#.............#.#...#...#.....#...#...#...#.........#...#.#...#.#.#.....#.#.......#.....#.#.....#.....#...#.#...#...#.#OOOOO#.....#
###.#.#.#.#########.#.###.###.###.###.###.#.#.#.###.#.#######.###.#.###.###.#.###.#.#######.#######.#.###.#######.#.#.#.#######.#O#########.#
#...#.#...#...#.......#.........#...#.#...#.#.....#...#.....#...#.#.........#.....#.............#...#...#.#.....#.#.....#.......#OOOOOOO..#.#
#.#####.###.#.###############.#####.#.#.###.#####.#######.#####.#.#####################.#########.#####.#.#.#####.#####.#.#.###.#######O###.#
#.#...#.#...#.......#.....#.......#...#...#.......#.......#.....#.#...#.....#.........#...........#.....#.#.#.....#.....#.#...#OOOOOOOOO#...#
#.#.#.###.#########.#.###.#.###.###.#.###.#.#######.#.#####.###.#.#.#.###.#.#.#####.#.#.#########.#.#.#.#.#.#.#####.#.#####.#.#O#####.###.###
#...#...#.#.....#.#.#...#...#.#.......#.....#.....#.#.....#...#.....#...#.#.#.#...#.#.#.............#...#...#.#...#.#.#...#.#..OOO..#.#...#.#
#.#####.#.#.###.#.#.###.#####.#########.#####.###.###.#.#.###.#.#######.#.###.#.#.#.###.#############.#.#.#.#.#.###.#.#.#.#######O#.###.###.#
#.#...#.....#.....#.....#.....#.......#.....#...#...#...#...#.#.....#...#.......#.#.#...#...#.......#.#.#.#...#.#...#...#.#.....#O#.#...#OOO#
#.#.#.#.#########.###########.#.###.#######.###.###.#######.#.###.###.#############.#.#####.#.#####.###.#.#.###.#.#######.#.###.#O#.#.###O#O#
#.#.#.#...#...#.#.....#.....#...#.#.#.....#...#.#.#.#.......#...#.#...#.........#...#.......#.#...#...#.#.#.#...#.#.....#.#.#...#O#...#OOO#O#
#.#.#.#.###.#.#.#####.###.#.#.###.#.#.###.#.#.#.#.#.#.#####.###.#.#.###.#######.#.#######.###.#.#.###.#.#.#.#.#.#.#.###.#.#.#.###O#####O###O#
#.#.#.#.#...#.#.#...#.#...#.#.#...#.....#...#.....#.#.....#.#.#.#.#.#.......#...#.......#.#...#.#...#.#.#.#.#.#...#.#...#...#...#O#OOOOO#..O#
###.#.###.###.#.#.#.#.#.###.#.#.#.#########.#######.#.###.#.#.#.###.#######.#.#######.###.#.#####.###.#.###.#.###.#.###.#######.#O#O#######O#
#...#.....#.#.#.#.#...#.#...#.#.#...#.......#.......#...#.....#.....#...#.....#.......#...#.#.....#...#.#...#.....#...#.........#O#OOO#...#O#
#.#########.#.#.#.#####.###.#.###.#.#.#####.#.#########.#.#########.#.#.#.###.#.#######.###.#.#.###.#.#.#.#########.#.#########.#O###O#.#.#O#
#...#.......#.#.#.#.......#.#...#.#...#.....#...........#.#...#.............#.#.#.......#.#.#.#...#...#.#.#.......#.#...#.......#OOOOO#.#.#O#
###.#.#####.#.#.#.#######.#.###.#.#.#####.###########.#.###.#.#.#####.#####.#.#.#.#######.#.###.#.###.#.#.###.###.#.###.#.#####.#.#####.#.#O#
#...#.....#...#.......#...#...#...#.#...#...#...#.....#.....#.#.#...#.#...#.....#.........#...#.#...#...#.....#.#.#.#.#.#.#.#...#.#.....#.#O#
#.#######.###########.#.#.###.###.#.#.#.###.#.#.#.#.#######.#.#.#.#.#.###.#.#######.#####.###.#.###.###.#####.#.#.#.#.#.#.#.#.#.###.#####.#O#
#.#.......#.........#...#...#...#.#...#...#.#.#...#.#.....#.#.......#...#.#...#.....#...#.#.#.#...#...#.#.......#.#...#...#.#.#.......#...#O#
#.#.#########.###.#.#######.###.#########.#.#.#####.#.#.#.#####.#.###.#.#.#.###.###.#.#.#.#.#.#####.#.#.#.#####.#.#######.#.#.#.#######.###O#
#.#.#.........#...#...#.....#...#.........#.#.#.....#.#.#.....#.#...........#...#.....#.#...#.....#.#.#.#.#...#.#.#.....#...#.#.....#...#.#O#
#.#.###.#########.###.#.#.###.###.###.#####.#.###.###.#.#####.###.#####.#.###.###.#####.#.#######.#.###.#.#.#.#.#.#.###.#####.#.###.#.###.#O#
#.#.....#.#.........#.#.........#.#...#.....#.....#...#.....#...#.#...#.#...#.#...#.....#.#.......#...#.#...#.#.#...#...#...#.......#.#...#O#
#.#######.#.#.#.#.###.#.#######.#.#.###.#####.#.#.#.#######.###.#.#.###.#.#.#.#.###.#######.#######.#.#.#####.#.#####.###.#.###.#####.#.###O#
#.............#.#.#...#.#.....#...#.....#...#.#.#.#.#...#.........#.....#.#...#...#.......#...#.....#.......#.#.#...#.......#.........#OOOOO#
#.#.#.#.#####.#.#.#.###.#.###.#####.#####.#.#.#.#.#.#.###.#.#######.###.#.#.#####.#######.#.#.###########.#.#.#.#.#.###.###.#.#.#.#####O#####
#.#.#.#.#...#.#.#.#.#...#.#...#.....#...#.#.#.#.#.#.#...#.......#.#.....#...#...#...#...#.#.#...........#.....#...#...#...#.#.#.#.....#O#OOO#
#.#.#.#.#.#.#.#.#.#.#.###.#.###.#####.#.#.#.#.#.#.#.###.#######.#.#####.###.#.#####.###.#.#####.#######.###.#######.#.###.#.#.#.#####.#O#O#O#
#.....#...#...#...#.#...#.#...#...#...#...#...#.#.#...#.......#.....#.....#.#.....#...#.......#.#.....#...#...#.....#.....#.#.#.#.....#OOO#O#
#.#.#.#.#####.###.#.###.#.###.###.###.###.###.#.#####.#.#.###.#.###.#.###.#.###.#####.#######.#.#.###.###.#.#.#.###.#.#.#.#.#.#.#.#########O#
#.#.#.#.#...#.....#...#.#.#.#.#.......#...#...#.#.....#.#...#.#...#.....#.......#...#.......#.#.#...#.....#.#...#...#...#.#...#...#OOOOOOOOO#
#.#.#.###.#.#.###.###.###.#.#.#.#######.###.###.#.#####.#.#.#.###.###.###.#######.#.#######.#.###.#.#.#####.#.#.#.#######.#####.###O#########
#.#.#.#...#...#...#...#...#...#.#...#...#...#.....#.....#...#...#...#.#...#.......#.........#...#.#.#.#...#.#...#.......#...#..OOO#O#.....#.#
#.###.#.#.###.#.###.###.###.#####.#.###.#.#######.#####.#.###.#####.###.###.###################.###.###.#.#.###########.###.#.#O#O#O#.#.#.#.#
#...#...#...#.#.#...#.....#.......#...#.#.......#.....#.#.#...#...#.....#...#...#...........#.....#.#...#.#...........#.....#.#O#OOO#.#.#.#.#
###.#####.#.#.#.#.#.#.###.###########.#.#######.#####.###.#####.#.#######.###.#.#.#####.#.#.#.###.#.#.###.###.#######.#######.#O#######.#.#.#
#...#...#.#.#.#...#.#...#.#.......#...#...#.....#...#.....#...#.#.....#...#...#...#...#.#.#...#...#.#...#.#...#.....#.#.....#.#O........#.#.#
#.###.#.#.#.#.###.#.###.#.#.#####.#.#####.#.#######.###.#.#.#.#.#####.#.###.#########.#.#.#####.###.#.###.#####.###.###.###.#.#O#########.#.#
#.#...#.#.#...#.....#.#.#.#.#...#.#.......#.......#.#...#...#.....#...#.#.....#.......#.#.#...#.#.....#...#.....#.#.....#.#...#OOO..........#
#.#.#.#.#.###.#.#####.#.#.#.###.#.#######.#.#####.#.#.#####.#######.###.#####.#.#####.#.#.#.#.#.#######.###.#####.#######.#######O###.#.###.#
#...#.#...#...#.#.......#.#...#.....#...#.#.....#.#.#.#...#.......#...#.....#.#.#...#.#...#.#...#.....#...#.#.#.......#.........#O#...#.....#
#.###.###.#.#.#.#########.###.#.#####.#.#.#######.#.#.#.#.#.#####.#.#.#####.#.#.#.#.#.#.###.#####.###.###.#.#.#.###.###.#.#.###.#O#.###.#####
#.#...#...#.#.............#...#.#.....#...#.......#.#...#...#...#.#.#.#.....#.#.#.#.#.#.....#.#...#.#.....#.#.#.#.#.....#...#.#.#O#.#.#...#.#
#.#.###.#.#.#.###.#.#.#####.#####.#######.#.#######.#########.###.#.#.#.#####.#.#.#.###.#.###.#.#.#.#####.#.#.#.#.###.###.###.#.#O#.#.###.#.#
#.#...#.#...#...#...#.#...#.........#...#...#.#.............#...#...#.#.#.....#...#.....#...#...#.#.....#.#.#.....#...#...#.#...#O#.#.....#.#
#.###.#######.#.#.#.###.#.###########.#.#####.#.#########.###.#.###.#.#.###.###.#####.#####.###.#.#.###.#.#.#######.#.#.###.#.###O#.#.#####.#
#.....#.......#...#.....#.#...........#.#...#...#.....#.#...#.#.....#.#...#...#.#...#.#...#...#.#.#...#...#.#.....#.#.#.#...#..OOO..#.#.....#
#.#.###.#######.#########.#.#####.#####.#.#.#.###.###.#.###.#.#######.###.###.#.#.#.#.###.###.###.###.#####.#.###.#.#.#.#.###.#O#####.#.#####
#.#.....#.....#.#.#.....#...#...#...#...#.#.#.#...#.#...#.#.#.........#...#...#.#.#.#.#.....#.#...#.#.#.....#...#...#.#.#.....#OOO#...#.....#
#.#.#######.#.#.#.#.###.###.#.#.#####.###.#.#.###.#.###.#.#.#########.#.###.###.#.#.#.#.#####.#.###.#.#.#####.#.#####.#.#####.#O#O#.#######.#
#.#.......#.#...#.#.#.#...#.#.#...#.......#.....#.#.....#.#.....#.....#.#.....#.#.#.#...#.....#.#.....#.#...#.#...#.#.......#.#O#O#.........#
#.#######.#.#####.#.#.###.#.#.###.#.#######.###.#.###.###.#####.#.#######.###.###.#.###.#.#####.#.#####.#.###.###.#.#.#####.###O#O#########.#
#...#.#...#...#...#.#...#.#.#.#...#.#.....#...#.#...#.....#.....#.......#.#...#.......#.#...#...#.#.....#.......#.#.#.......#..O#O#...#...#.#
#.#.#.#.#####.#.#.#.#.###.###.#.#.#.#.###.###.#.#.#.#####.#.#.#########.#.#.###.#####.#.###.#.#####.#########.###.#.#.#.###.#.#O#O#.#.#.#.#.#
#.#.#.#...#.....#.#.#...#.....#.#...#...#.....#.#.#...#...#.#.#.........#.....#.#.#...#.#.#.#.......#.......#.#...#.#.#.#...#.#O#O#.#.#.#...#
###.#.###.#######.#.#.#.#######.###.###.#######.#.###.#####.###.#.###.#.#.###.#.#.#.###.#.#.#####.###.#####.###.###.#.#.###.#.#O#O#.###.#####
#...#...#.......#...#.#.......#...#...#.........#...#.....#.....#...#.#.#...#.#...#.#.#...#.....#.#.....#.......#.....#...#.#.#OOO#...#...#.#
#.#####.#######.#.###.#####.#####.###.#.#####.###.#######.#########.#.#.#####.#.###.#.#.#######.#.###.#.#########.#######.#.#.#O#O###.###.#.#
#.#...#.......#.#...#.#...#.#...#.....#.#.........#.......#...#...#.#.#.....#...#...#...#.....#.#...#.#...#.............#.#....OOO..#.....#.#
#.#.#.#.###.#.#.#.#.#.#.#.#.#.#.###.###.###########.#####.#.#.#.###.#.#####.#####.###.###.###.#.###.#.###.#############.#.###.#O#O#.#.#####.#
#.#.#.#.#...#.#.#.#.#.#.#...#.#.......#.#...........#.....#.#...#...#.#...#.....#.#.#...#.#.#...#.#.#.#...#.......#.......#...#OOO#.#.#...#.#
#.#.#.#.#.#####.#.#.###.###.#.#######.#.#.#.#########.#####.#####.###.###.#####.#.#.###.#.#.#####.#.###.###.#####.#########.#####O#.#.#.#.#.#
#...#.#.#.......#.#...#...#.#.#.....#.....#.#...#...........#.....#.#.........#...#...#.#.#...#...#.#...#...#.#...#.......#.#.#..O#.#...#...#
#.#.#.#.#.#########.#.###.###.#####.#########.#.#.#########.#.#####.#####.###########.#.#.#.#.#.#.#.#.#.#.###.#.###.#####.#.#.#.#O#.#####.#.#
#...#...#.#.......#.#...#.#...#...#.....#.............#.....#...#.#.......#...........#.#.#.#.#.#.#...#...#...#.#...#...#.#.#....O..#.......#
#.#.###.#.###.###.#####.#.#.###.#.#.#####.###########.###.#.###.#.#.#######.###.#######.#.#.#.#.#.#####.#.#.###.#.###.#.#.#.###.#O#.#######.#
#.#...#.#...#...#.......#...#...#.#.....#...#...#.....#...#.#.#.......#.....#.#.....#.....#.#.#.#...#.....#.....#.#...#...#...#.#O#.#.....#.#
#.###.#.###.###.#########.###.###.#####.###.#.#.#.#.#.#.###.#.#.#.#####.#####.#####.#.###.#.#.#.###.#.#.#.#.#####.#####.#####.###O#.#.###.###
#...............#.#.....#.#...#...#.......#...#.#.#.#.#.......#.#.#.....#.........#...#.#.#.#.#.........#.#.....#.....#.......#OOO#.#.#.#...#
#.#####.#.#######.#.###.#.#.#.###.#.#.#.#.#####.#.#.#.#####.#.#.###.#####.###.#.#.#####.#.#.#####.#######.#####.#.###.#########O#.#.#.#.###.#
#.#...#...#.....#...#.#...#.#...#.#.#.#.......#.#.#.#.#...#...#.....#...#...#.#.#.#.......#.........#...#.#.....#...#.......#OOO#.#.#.#.#...#
#.#.#.#.###.#.###.###.#########.#.#.#.#.#.#####.#.###.#.#.###.#######.#####.#.#.#.#####.#.#.#########.#.#.###.#########.###.#O#.###.#.#.#.#.#
#.#.#.#...#.#.#...#.....#.......#...#...#.#.....#...#.#.#.#.#.#.....#.#.....#.#.......#.#.#.#...#.....#.#...#...#.....#...#.#O#...#...#.#...#
#.#.#.#.#.###.#.#####.#.###.#############.#.#####.#.#.#.#.#.#.#.###.#.#.#.###.#.#####.#.#.###.#.#.#####.###.#.#.#.###.#####.#O###.#####.###.#
#.#.#...#...#.........#.....#.....#.....#.#.#.....#.#...#.#.#...#.....#.#.#...#.......#.#.....#...#OOO#.....#.#...#.#.....#.#OOO#.........#.#
#.###.#.###.#.###.#.#########.###.#.#####.#.#.#####.#####.#.#.#.#######.#.#.###.#######.###########O#O#######.#####.#####.#.###O#########.#.#
#...#.#.#...#.#...#...#.........#.#.......#.#.#...#.......#.#.#.#.....#.#.#.#.#.......#...........#O#O#.#.......#OOO....#.#.#OOO#.......#.#.#
#.#.#.#.#.###.#####.#.#.#########.#.###.###.###.#.###.###.#.#.#.#.###.#.#.#.#.#######.#.#########.#O#O#.#.#.#####O#O###.#.#.#O###.#####.#.#.#
#.#.#.#.#.#.......#.#.....#.......#.......#.....#.#...#...#.#.#...#...#...#.#...........#.......#.#O#O..#.#..OOOOO#O#...#.#.#OOO#.....#.#...#
#.#.###.#.#######.#########.#.#####.#######.#####.#.#.#.###.#.#.###.###.###.#.###########.#.#.#.#.#O#O###.###O#.###O#.###.#.###O#####.#.#####
#.#.#...#.....#.......#.....#...#...#.......#...#...#.#.#.#...#.#.#.....#.....#.#...........#OOOOOOO#OOOOOOOOO#.#OOO#...#.#.#OOO#.....#.#...#
#.#.#.#.#####.#######.#.#####.#.#####.#.#.###.#.#####.#.#.#.###.#.#######.###.#.#.###########O#######.#####.#O#.#O#O#.#.#.#.#O###.#######.#.#
#.#.#.......#.....#.....#.....#.....#.#.....#.#...#...#.#...#.#.....#.#...#.....#...#.....#OOO#.....#.#.....#O#..O#O....#...#OOO#.#.......#.#
#.#.#.###.#.###.#.#######.#########.#.#######.###.#####.#.###.#####.#.#.###########.#####.#O###.###.#.#.###.#O###O#O###.#######O#.#.#######.#
#...#.#.#.#.#...#.#...#...#.#.....#...#...#...#.#...#...#.#...#.....#.#.#...........#.....#OOO#.#.#...#.#...#OOOOO#OOO#...#...#O#.#.#.....#.#
#.###.#.#.###.#.#.#.#.#.###.#.###.#####.###.###.###.#.###.#.###.#####.#.#.#########.#.#####.#O#.#.#####.#.#####.#####O###.#.###O#.#.#.###.#.#
#...#.#.#...#.#.#...#...#.....#.#.....#...#.#.....#.#.#.#.#.........#.#.......#OOO#...#OOO#.#O#.#...#...#...#...#...#O#.....#OOO#...#.#...#.#
###.#.#.###.#.#.###########.###.#####.#.#.#.#.#.###.#.#.#.#########.#.#########O#O#.###O#O###O#.#.#.###.###.#.#####.#O#######O###.#####.#.#.#
#...#.#...#...#.....#.....#.........#...#.#.#.#.......#...#.......#...#OOOOOOOOO#O#.#OOO#OOO#O#.#.#.....#.#...#.....#OOOOO..#O#.#.#...#.#.#.#
#.#.#.###.#####.###.###.#.#####.#########.#.###########.###.#####.###.#O#########O###O#####O#O#.#.#####.#.#####.###.#####O#.#O#.#.#.#.#.###.#
#...#.....#...#.#.#.#...#.#.#...#.........#.#.......#.....#.#.....#...#OOO#......OOOOO#....OOO#...#...#.........#.#.....#O..#O#.....#...#...#
#.#.#####.#.#.#.#.#.#.###.#.#.###.#######.#.#.#####.#####.#.#.#####.#####O#.###.#######.#######.#.###.###########.#.###.#O###O###########.#.#
#...#.....#.#.#.#.#...#...#.#.#...#...#.#.#.#.#...#.....#...#.#...#.#OOOOO#.....#...#...#.......#...#.......#.......#...#OOOOO#...#.....#.#.#
###.###.###.#.#.#.#####.###.#.#.###.#.#.#.#.#.#.###.#.#.#####.#.#.#.#O#.#####.#.#.#.#####.#########.#.#####.#.#####.#.#########.#.#.###.#.#.#
#.#...#.#.#.#...#.....#.#.....#.....#...#.#.....#...#.#...#.......#.#O#.#.....#.#.#.......#.#.......#.....#.#.#...#.#.#...#.....#...#.#.#.#.#
#.#.#.#.#.#.#####.#.###.#######.#.#.#.#.#.#####.#.#.#.###.#######.#.#O###.#####.#.#########.#.###.#######.#.#.###.#.#.#.#.###.#######.#.#.#.#
#.....#...#.....#.#.#...#.....#.#.#.#...#.......#.#.#...#...#...#.#.#O#.....#...#.......#...#.#.#.....#...#.#.....#...#.#...#.....#.......#.#
#.#.#####.#####.#.###.###.###.#.#.#.#########.###.#.#######.#.#.#.###O#.#####.#########.#.###.#.#####.#.###.#.#.#######.###.#.###.#########.#
#.....#...#...#.#...#.#.....#.....#.......#...#...#.........#.#.#...#O#.#.#...#.......#.#...#.......#.#...#.#.#.........#.#.#.#.#.....#.....#
#####.###.###.#.###.#.#.###.#####.#####.###.###.#############.#####.#O#.#.#.###.#.#####.#.#.###.#####.#####.#.#####.#.###.#.#.#.#####.###.###
#...#...#.....#.....#.#.#...#...#.....#...#.#...#.....#OOOOOOOOOOO#.#O#...........#...#.#.#.....#.....#.....#.....#.#.#.....#...#...#...#...#
#.#.###.#########.#.#.###.###.###.###.###.#.#.#####.#.#O#########O#.#O###.#######.#.#.#.#.#######.###.#.#.#.###.#.###.#.#####.###.#.#.#.###.#
#.#...#...........#.#.#...#.......#.....#.#.#.....#.#.#OOO#...#.#O#.#O#...#.....#.#.#...#.......#.#...#.#.#.....#.....#.#...#.#...#.#.#.#.#.#
#.#.###############.#.#.###.#######.###.#.#.#####.#.#####O#.#.#.#O#.#O#.#.#.###.#.#.#####.###.###.#.###.#.#.###.#######.#.#.#.#.###.###.#.#.#
#.#.#OOOOO..#OOOOO#...#...#.......#OOO#...#.......#.....#O..#...#OOOOO#.#...#...#.#.......#.#.#...#.#...#.#...#.#.....#.....#.#.............#
#.###O###O###O###O#.#####.#######.#O#O#########.#.#.#.###O###.#.#######.#.#.#.###.#######.#.#.#.#####.###.###.###.#.#######.#.#.#########.#.#
#OOO#O#.#OOOOO..#O#.#...#...#...#..O#OOOOOOO#...#.#.#....O..#.#.#.......#.#.#.#...#...#...#...#...#.....#.#...#...#.......#.#.#.....#...#...#
#O#O#O#.#########O#.#.#.###.#.#####O#######O#.###.#.#.#.#O#.#.#.#.#######.#.#.#.###.#.#.#########.#.#####.#.#.#.#####.#####.#.#####.#.#.#.###
#O#O#OOOOO#...#..OOOOOOOOOOOOOOOOO#OOOOO#.#O#.#.#.#...#.#O#...#.#...#.....#.#.#.....#...#.......#.....#...#.#.#.#...................#.#.#...#
#O#O#####O#.###.#.###.#######.#.#O#####O#.#O#.#.#.#.#.#.#O#.###.###.#######.#.#############.###.#######.###.#.#.###.#.#.#.#.#####.#####.###.#
#O#OOOOOOO..#...#.#...#.......#.#O....#OOO#O#...#.#.#...#O..#...#...#.......#.........#...#.#...........#...#.#.....#.#.#...#...#.#.....#...#
#O###########.###.#.#.#.###.###.#O#.#####O#O###.#.###.###O###.###.###.#######.#######.#.#.#.#############.#####.#####.#.#####.#.#.#.#.###.###
#OOO#OOO#.#...#...#.#.#...#.#...#O#.#OOOOO#O#...#...#....O......#.....#.......#...#...#.#.#...#...........#.....#.....#.#.....#...#.#...#.#.#
###O#O#O#.#.###.###.#.###.#.#.###O#.#O#####O#.#####.#.###O#############.#.#.###.#.#.###.#.###.#######.#####.#####.###.#.#.###.#####.###.#.#.#
#.#OOO#O..#.#.#.#...#.#...#...#..O#.#O....#O#...#.#.#...#O..#.....#.....#.#.#...#.#.....#...#.......#.#.....#...#.#...#.#...#.#...#.#.#.#...#
#.#####O###.#.#.#.###.#.#######.#O###O#####O###.#.#.#####O#.#.#.###.#####.#.#.###.#########.#.#####.#.#.#####.###.#.###.###.#.#.#.#.#.#.###.#
#OOOOO#O#...#...#.#.#...#.....#..O#OOO#....OOOOOOOOOOOOO#O#...........................#...#.#.#.....#.#.#.....#...#.#...#...#.#.#.#.#.#.....#
#O###O#O#.#######.#.#######.#.###O#O###.#########.#.#.#O#O#######.###.#.###.###.#####.#.#.#.#.#.#####.#.#####.#.#####.#######.#.#.#.#.#######
#O..#OOO#...................#...#OOO..#...........#...#OOO......#.....#.............#...#.......#.............#...............#.#...........#
#############################################################################################################################################
+79
View File
@@ -0,0 +1,79 @@
from collections import namedtuple
from math import sqrt
from pathlib import Path
Point = namedtuple('Point', ['y', 'x'])
Node = namedtuple('Node', ['p', 'd'])
# set up inputs
text = Path('input').read_text('utf-8')
board_lines = text.splitlines()
width = len(board_lines[0])
board = list(map(list, board_lines))
start, end = Point(*divmod(text.find('S'), width + 1)), Point(*divmod(text.find('E'), width + 1))
# simple cost heuristic based on distance to end node
def cost_heuristic(p: Point) -> float:
return sqrt((p.x - end.x) ** 2 + (p.y - end.y) ** 2)
# walks path backwards, scans for nodes with incoming paths of equal cost, and traverses all recursively
def equal_cost_backtrace(parent: dict, node_cost: dict, current: Node) -> set[Point]:
last_direction = current.d
trace = {current.p}
while current := parent.get(current):
trace.add(current.p)
for d in map(lambda o: (current.d + o) & 3, [1, -1]):
test = Node(current.p, d)
if last_direction != current.d and (node_cost.get(test, 0) - node_cost[current]) == 1000:
trace.update(equal_cost_backtrace(parent, node_cost, parent.get(test)))
last_direction = current.d
return trace
# simple A star
def a_star() -> tuple[int, int]:
t_start = Node(start, 0)
pending: set[Node] = {t_start}
parent: dict[Node, Node] = {}
node_cost: dict[Node, float] = {t_start: 0.0}
total_cost: dict[Node, float] = {t_start: cost_heuristic(t_start.p)}
while len(pending):
current = min(pending, key=lambda t: total_cost[t])
if current.p == end:
return int(node_cost[current]), len(equal_cost_backtrace(parent, node_cost, current))
pending.remove(current)
# scan in all directions
for i, vector in enumerate([(0, 1), (1, 0), (0, -1), (-1, 0)]):
neighbor = Node(Point(current.p.y + vector[0], current.p.x + vector[1]), i)
if board[neighbor.p.y][neighbor.p.x] == '#':
continue
# assign new cost based on rotation and step
new_cost = node_cost[current] + [0, 1000, 2000, 1000][(i - current.d) & 3] + 1
if new_cost >= node_cost.get(neighbor, 1e13):
continue
parent[neighbor] = current
node_cost[neighbor] = new_cost
total_cost[neighbor] = new_cost + cost_heuristic(neighbor.p)
if neighbor in pending:
continue
pending.add(neighbor)
return 0, 0
lowest_cost, nodes = a_star()
print("Part 1:", lowest_cost)
print("Part 2:", nodes)
Binary file not shown.
+82
View File
@@ -0,0 +1,82 @@
--- Day 17: Chronospatial Computer ---
The Historians push the button on their strange device, but this time, you all just feel like you're falling.
"Situation critical", the device announces in a familiar voice. "Bootstrapping process failed. Initializing debugger...."
The small handheld device suddenly unfolds into an entire computer! The Historians look around nervously before one of them tosses it to you.
This seems to be a 3-bit computer: its program is a list of 3-bit numbers (0 through 7), like 0,1,2,3. The computer also has three registers named A, B, and C, but these registers aren't limited to 3 bits and can instead hold any integer.
The computer knows eight instructions, each identified by a 3-bit number (called the instruction's opcode). Each instruction also reads the 3-bit number after it as an input; this is called its operand.
A number called the instruction pointer identifies the position in the program from which the next opcode will be read; it starts at 0, pointing at the first 3-bit number in the program. Except for jump instructions, the instruction pointer increases by 2 after each instruction is processed (to move past the instruction's opcode and its operand). If the computer tries to read an opcode past the end of the program, it instead halts.
So, the program 0,1,2,3 would run the instruction whose opcode is 0 and pass it the operand 1, then run the instruction having opcode 2 and pass it the operand 3, then halt.
There are two types of operands; each instruction specifies the type of its operand. The value of a literal operand is the operand itself. For example, the value of the literal operand 7 is the number 7. The value of a combo operand can be found as follows:
Combo operands 0 through 3 represent literal values 0 through 3.
Combo operand 4 represents the value of register A.
Combo operand 5 represents the value of register B.
Combo operand 6 represents the value of register C.
Combo operand 7 is reserved and will not appear in valid programs.
The eight instructions are as follows:
The adv instruction (opcode 0) performs division. The numerator is the value in the A register. The denominator is found by raising 2 to the power of the instruction's combo operand. (So, an operand of 2 would divide A by 4 (2^2); an operand of 5 would divide A by 2^B.) The result of the division operation is truncated to an integer and then written to the A register.
The bxl instruction (opcode 1) calculates the bitwise XOR of register B and the instruction's literal operand, then stores the result in register B.
The bst instruction (opcode 2) calculates the value of its combo operand modulo 8 (thereby keeping only its lowest 3 bits), then writes that value to the B register.
The jnz instruction (opcode 3) does nothing if the A register is 0. However, if the A register is not zero, it jumps by setting the instruction pointer to the value of its literal operand; if this instruction jumps, the instruction pointer is not increased by 2 after this instruction.
The bxc instruction (opcode 4) calculates the bitwise XOR of register B and register C, then stores the result in register B. (For legacy reasons, this instruction reads an operand but ignores it.)
The out instruction (opcode 5) calculates the value of its combo operand modulo 8, then outputs that value. (If a program outputs multiple values, they are separated by commas.)
The bdv instruction (opcode 6) works exactly like the adv instruction except that the result is stored in the B register. (The numerator is still read from the A register.)
The cdv instruction (opcode 7) works exactly like the adv instruction except that the result is stored in the C register. (The numerator is still read from the A register.)
Here are some examples of instruction operation:
If register C contains 9, the program 2,6 would set register B to 1.
If register A contains 10, the program 5,0,5,1,5,4 would output 0,1,2.
If register A contains 2024, the program 0,1,5,4,3,0 would output 4,2,5,6,7,7,7,7,3,1,0 and leave 0 in register A.
If register B contains 29, the program 1,7 would set register B to 26.
If register B contains 2024 and register C contains 43690, the program 4,0 would set register B to 44354.
The Historians' strange device has finished initializing its debugger and is displaying some information about the program it is trying to run (your puzzle input). For example:
Register A: 729
Register B: 0
Register C: 0
Program: 0,1,5,4,3,0
Your first task is to determine what the program is trying to output. To do this, initialize the registers to the given values, then run the given program, collecting any output produced by out instructions. (Always join the values produced by out instructions with commas.) After the above program halts, its final output will be 4,6,3,5,6,3,5,2,1,0.
Using the information provided by the debugger, initialize the registers to the given values, then run the program. Once it halts, what do you get if you use commas to join the values it output into a single string?
Your puzzle answer was 7,1,5,2,4,0,7,6,1.
--- Part Two ---
Digging deeper in the device's manual, you discover the problem: this program is supposed to output another copy of the program! Unfortunately, the value in register A seems to have been corrupted. You'll need to find a new value to which you can initialize register A so that the program's output instructions produce an exact copy of the program itself.
For example:
Register A: 2024
Register B: 0
Register C: 0
Program: 0,3,5,4,3,0
This program outputs a copy of itself if register A is instead initialized to 117440. (The original initial value of register A, 2024, is ignored.)
What is the lowest positive initial value for register A that causes the program to output a copy of itself?
Your puzzle answer was 37222273957364.
Both parts of this puzzle are complete! They provide two gold stars: **
+79
View File
@@ -0,0 +1,79 @@
#!/usr/bin/env python3
import sys, re, math
out = []
def output(i):
out.append(i)
def instr(opc, op, ra, rb, rc, p):
cop = op
if op in [4,5,6]: cop = [ra,rb,rc][op-4]
if op == 7: cop = 'ERROR'
if opc == 0: # 'adv' instruction
ra = math.trunc(ra / 2**cop)
p += 2
elif opc == 1: # 'bxl' instruction
rb = rb ^ op
p += 2
elif opc == 2: # 'bst' instruction
rb = cop % 8
p += 2
elif opc == 3: # 'jnz' instruction
if ra != 0:
p = op
else:
p += 2
elif opc == 4: # 'bxc' instruction
rb = rb ^ rc
p += 2
elif opc == 5: # 'out' instruction
output(cop % 8)
p += 2
elif opc == 6: # 'bdv' instruction
rb = math.trunc(ra / 2**cop)
p += 2
elif opc == 7: # 'cdv' instruction
rc = math.trunc(ra / 2**cop)
p += 2
return ra, rb, rc, p
def step(lb, ub, i, exp):
for ra in range(lb, ub):
if (((ra//8**i)%8) ^ 1 ^ int((ra//8**i) / 2**((ra//8** i%8)^2)) % 8) == exp: yield ra
if __name__ == '__main__':
ins = open(sys.argv[1]).read()
g = re.search(r'Register A: (?P<ra>\d+)\nRegister B: (?P<rb>\d+)\nRegister C: (?P<rc>\d+)\n\nProgram: (?P<prog>(\d+,?)*)', ins)
ra, rb, rc = int(g['ra']), int(g['rb']), int(g['rc'])
prog = [int(p) for p in g['prog'].split(',')]
pointer = 0
while True:
if pointer >= len(prog): break
ra, rb, rc, pointer = instr(prog[pointer], prog[pointer+1], ra, rb, rc, pointer)
possible_bounds = [(0,8)]
for i in range(15,-1,-1):
exp = prog[i]
possible_x = []
for lb, ub in possible_bounds:
possible_x += [i for i in step(lb, ub, 0, exp)]
possible_bounds = [(x*8,(x+1)*8) for x in possible_x]
ra = min(possible_x)
# challenge 1
res1 = ','.join([str(o) for o in out])
print(f"challenge 1:\n{res1}\n")
# challenge 2
res2 = ra
print(f"challenge 2 (only works for my input):\n{res2}")
+5
View File
@@ -0,0 +1,5 @@
Register A: 2024
Register B: 0
Register C: 0
Program: 0,1,5,4,3,0
+5
View File
@@ -0,0 +1,5 @@
Register A: 117440
Register B: 0
Register C: 0
Program: 0,3,5,4,3,0
+5
View File
@@ -0,0 +1,5 @@
Register A: 729
Register B: 0
Register C: 0
Program: 0,1,5,4,3,0
+5
View File
@@ -0,0 +1,5 @@
Register A: 0
Register B: 2024
Register C: 43690
Program: 4,0
+20
View File
@@ -0,0 +1,20 @@
Register A: 48744869
Register B: 0
Register C: 0
Program: 2,4,1,2,7,5,1,3,4,4,5,5,0,3,3,0
bst ra (rb = ra % 8)
bxl 2 (rb = rb ^ 2)
cdv rb (rc = int(ra / 2**rb))
bxl 3 (rb = rb ^ 3)
bxc _ (rb = rb ^ rc)
out rb (print rb % 8)
adv 3 (ra = int(ra / 8))
jnz 0 (loop if ra != 0)
print rb%8 = rb^rc % 8 = rb ^ 3 ^ rc % 8 = rb ^ 3 ^ int(ra / 2^rb) % 8 = rb ^ 2 ^ 3 ^ int(ra / 2**(rb^2)) % 8 =
(ra%8) ^ 2 ^ 3 ^ int(ra / 2**((ra%8)^2)) % 8 = 2
((ra//8**1)%8) ^ 2 ^ 3 ^ int((ra//8**1) / 2**((ra%8**1)^2)) % 8 = 4
-> must loop 16 times, so ra must be around 8^15 to 8^16?
prints out
+98
View File
@@ -0,0 +1,98 @@
--- Day 18: RAM Run ---
You and The Historians look a lot more pixelated than you remember. You're inside a computer at the North Pole!
Just as you're about to check out your surroundings, a program runs up to you. "This region of memory isn't safe! The User misunderstood what a pushdown automaton is and their algorithm is pushing whole bytes down on top of us! Run!"
The algorithm is fast - it's going to cause a byte to fall into your memory space once every nanosecond! Fortunately, you're faster, and by quickly scanning the algorithm, you create a list of which bytes will fall (your puzzle input) in the order they'll land in your memory space.
Your memory space is a two-dimensional grid with coordinates that range from 0 to 70 both horizontally and vertically. However, for the sake of example, suppose you're on a smaller grid with coordinates that range from 0 to 6 and the following list of incoming byte positions:
5,4
4,2
4,5
3,0
2,1
6,3
2,4
1,5
0,6
3,3
2,6
5,1
1,2
5,5
2,5
6,5
1,4
0,4
6,4
1,1
6,1
1,0
0,5
1,6
2,0
Each byte position is given as an X,Y coordinate, where X is the distance from the left edge of your memory space and Y is the distance from the top edge of your memory space.
You and The Historians are currently in the top left corner of the memory space (at 0,0) and need to reach the exit in the bottom right corner (at 70,70 in your memory space, but at 6,6 in this example). You'll need to simulate the falling bytes to plan out where it will be safe to run; for now, simulate just the first few bytes falling into your memory space.
As bytes fall into your memory space, they make that coordinate corrupted. Corrupted memory coordinates cannot be entered by you or The Historians, so you'll need to plan your route carefully. You also cannot leave the boundaries of the memory space; your only hope is to reach the exit.
In the above example, if you were to draw the memory space after the first 12 bytes have fallen (using . for safe and # for corrupted), it would look like this:
...#...
..#..#.
....#..
...#..#
..#..#.
.#..#..
#.#....
You can take steps up, down, left, or right. After just 12 bytes have corrupted locations in your memory space, the shortest path from the top left corner to the exit would take 22 steps. Here (marked with O) is one such path:
OO.#OOO
.O#OO#O
.OOO#OO
...#OO#
..#OO#.
.#.O#..
#.#OOOO
Simulate the first kilobyte (1024 bytes) falling onto your memory space. Afterward, what is the minimum number of steps needed to reach the exit?
Your puzzle answer was 446.
--- Part Two ---
The Historians aren't as used to moving around in this pixelated universe as you are. You're afraid they're not going to be fast enough to make it to the exit before the path is completely blocked.
To determine how fast everyone needs to go, you need to determine the first byte that will cut off the path to the exit.
In the above example, after the byte at 1,1 falls, there is still a path to the exit:
O..#OOO
O##OO#O
O#OO#OO
OOO#OO#
###OO##
.##O###
#.#OOOO
However, after adding the very next byte (at 6,1), there is no longer a path to the exit:
...#...
.##..##
.#..#..
...#..#
###..##
.##.###
#.#....
So, in this example, the coordinates of the first byte that prevents the exit from being reachable are 6,1.
Simulate more of the bytes that are about to corrupt your memory space. What are the coordinates of the first byte that will prevent the exit from being reachable from your starting position? (Provide the answer as two integers separated by a comma with no other characters.)
Your puzzle answer was 39,40.
Both parts of this puzzle are complete! They provide two gold stars: **
+80
View File
@@ -0,0 +1,80 @@
#!/usr/bin/env python3
import sys
from copy import deepcopy
def dijkstra(graph, s):
a = {}
v = {}
Q = initG(graph, s, a, v)
lq = len(Q)
while len(Q) > 0:
u = min([u for u in Q], key=lambda x: a[x])
Q.remove(u)
for vo in nb(*u):
if vo in Q:
distance_update(graph, u,vo,a,v)
return v
def initG(graph, s, a, v):
for vo in graph.keys():
a[vo] = 9999999999999999
v[vo] = 'null'
a[s] = 0
Q = [n for n in graph.keys()]
return Q
def distance_update(g, u,vo,a,v):
alt = a[u] + g[u]
if alt < a[vo]:
a[vo] = alt
v[vo] = u
def shortest_path(g, d, v):
w = [d]
u = d
r = 0
while v[u] != 'null':
r += g[u]
u = v[u]
w.append(u)
return w.reverse(), r
if __name__ == '__main__':
size = 71 # 7 for example, 71 for real input
pos = (0,0)
end = (70,70) # 6,6 for example, 70,70 for real input
blocks = [(int(l) for l in line.strip('\n').split(',')) for line in open(sys.argv[1])]
def nb(sx, sy):
n = [(0,1), (1,0), (0,-1), (-1,0)]
return [(min(size,max(0,sx+x)), min(size,max(0,sy+y))) for x,y in n]
g1 = {(x,y) : 1 for x in range(size) for y in range(size)}
for x,y in blocks[:1024]:
g1.pop((x,y))
# challenge 1
v = dijkstra(g1, (0,0))
w, r = shortest_path(g1, end, v)
res1 = r
print(f"challenge 1:\n{res1}\n")
# challenge 2
# i did some binary search to figure out the index would be
# between 2800 and 2900
for x,y in blocks[1024:2800]:
g1.pop((x,y))
for x,y in blocks[2800:]:
g1.pop((x,y))
g = deepcopy(g1)
v = dijkstra(g, (0,0))
w, r = shortest_path(g, end, v)
if r == 0:
res2 = str(x) + "," + str(y)
break
print(f"challenge 2:\n{res2}")
+25
View File
@@ -0,0 +1,25 @@
5,4
4,2
4,5
3,0
2,1
6,3
2,4
1,5
0,6
3,3
2,6
5,1
1,2
5,5
2,5
6,5
1,4
0,4
6,4
1,1
6,1
1,0
0,5
1,6
2,0
+3450
View File
File diff suppressed because it is too large. Load diff
+84
View File
@@ -0,0 +1,84 @@
--- Day 19: Linen Layout ---
Today, The Historians take you up to the hot springs on Gear Island! Very suspiciously, absolutely nothing goes wrong as they begin their careful search of the vast field of helixes.
Could this finally be your chance to visit the onsen next door? Only one way to find out.
After a brief conversation with the reception staff at the onsen front desk, you discover that you don't have the right kind of money to pay the admission fee. However, before you can leave, the staff get your attention. Apparently, they've heard about how you helped at the hot springs, and they're willing to make a deal: if you can simply help them arrange their towels, they'll let you in for free!
Every towel at this onsen is marked with a pattern of colored stripes. There are only a few patterns, but for any particular pattern, the staff can get you as many towels with that pattern as you need. Each stripe can be white (w), blue (u), black (b), red (r), or green (g). So, a towel with the pattern ggr would have a green stripe, a green stripe, and then a red stripe, in that order. (You can't reverse a pattern by flipping a towel upside-down, as that would cause the onsen logo to face the wrong way.)
The Official Onsen Branding Expert has produced a list of designs - each a long sequence of stripe colors - that they would like to be able to display. You can use any towels you want, but all of the towels' stripes must exactly match the desired design. So, to display the design rgrgr, you could use two rg towels and then an r towel, an rgr towel and then a gr towel, or even a single massive rgrgr towel (assuming such towel patterns were actually available).
To start, collect together all of the available towel patterns and the list of desired designs (your puzzle input). For example:
r, wr, b, g, bwu, rb, gb, br
brwrr
bggr
gbbr
rrbgbr
ubwu
bwurrg
brgr
bbrgwb
The first line indicates the available towel patterns; in this example, the onsen has unlimited towels with a single red stripe (r), unlimited towels with a white stripe and then a red stripe (wr), and so on.
After the blank line, the remaining lines each describe a design the onsen would like to be able to display. In this example, the first design (brwrr) indicates that the onsen would like to be able to display a black stripe, a red stripe, a white stripe, and then two red stripes, in that order.
Not all designs will be possible with the available towels. In the above example, the designs are possible or impossible as follows:
brwrr can be made with a br towel, then a wr towel, and then finally an r towel.
bggr can be made with a b towel, two g towels, and then an r towel.
gbbr can be made with a gb towel and then a br towel.
rrbgbr can be made with r, rb, g, and br.
ubwu is impossible.
bwurrg can be made with bwu, r, r, and g.
brgr can be made with br, g, and r.
bbrgwb is impossible.
In this example, 6 of the eight designs are possible with the available towel patterns.
To get into the onsen as soon as possible, consult your list of towel patterns and desired designs carefully. How many designs are possible?
Your puzzle answer was 265.
--- Part Two ---
The staff don't really like some of the towel arrangements you came up with. To avoid an endless cycle of towel rearrangement, maybe you should just give them every possible option.
Here are all of the different ways the above example's designs can be made:
brwrr can be made in two different ways: b, r, wr, r or br, wr, r.
bggr can only be made with b, g, g, and r.
gbbr can be made 4 different ways:
g, b, b, r
g, b, br
gb, b, r
gb, br
rrbgbr can be made 6 different ways:
r, r, b, g, b, r
r, r, b, g, br
r, r, b, gb, r
r, rb, g, b, r
r, rb, g, br
r, rb, gb, r
bwurrg can only be made with bwu, r, r, and g.
brgr can be made in two different ways: b, r, g, r or br, g, r.
ubwu and bbrgwb are still impossible.
Adding up all of the ways the towels in this example could be arranged into the desired designs yields 16 (2 + 1 + 4 + 6 + 1 + 2).
They'll let you into the onsen as soon as you have the list. What do you get if you add up the number of different ways you could make each design?
Your puzzle answer was 752461716635602.
Both parts of this puzzle are complete! They provide two gold stars: **
+47
View File
@@ -0,0 +1,47 @@
#!/usr/bin/env python3
import sys
def memo(f):
memo = {}
def f2(x,y):
if x not in memo: memo[x] = f(x,y)
return memo[x]
return f2
@memo
def count(p, ts):
poss = 0
for t in [t for t in ts if p.startswith(t)]:
if t == p: poss += 1
poss += count(p[len(t):],ts)
return poss
def possible(p, ts):
poss = False
for t in [t for t in ts if p.startswith(t)]:
if t == p: return True
poss = poss or possible(p[len(t):],ts)
if poss: return True
return poss
if __name__ == '__main__':
towels, patterns = open(sys.argv[1]).read().split('\n\n')
towels = [t for t in towels.strip('\n').split(', ')]
patterns = patterns.strip('\n').split('\n')
res1, res2 = 0, 0
for pattern in patterns:
res1 += possible(pattern, towels)
if possible(pattern, towels):
res2 += count(pattern, towels)
# challenge 1
print(f"challenge 1:\n{res1}\n")
# challenge 2
print(f"challenge 2:\n{res2}")
+10
View File
@@ -0,0 +1,10 @@
r, wr, b, g, bwu, rb, gb, br
brwrr
bggr
gbbr
rrbgbr
ubwu
bwurrg
brgr
bbrgwb
+402
View File
@@ -0,0 +1,402 @@
urubgur, buwu, wbr, gwbw, gg, urgw, uubruwu, brb, urr, buu, wgu, gwuwg, urwb, ruwgr, wgguwgg, wur, ggrub, rwg, gbwb, wbw, ruww, grgub, wwg, ugrrrurg, wbgbbug, ubbr, ugbu, bwwggwr, ruugrr, bub, bwr, rbuu, urwbgur, grb, uwbwrw, ubrurw, rgwu, rrg, bruw, brgb, wwuwur, uugg, gbrb, uwuwuur, uugwwwb, rr, urug, ubbb, urgrw, rgr, bubr, uww, bbw, grbww, ubgwg, ugrrb, ubwwu, wub, urggu, wbww, bugwww, gwwugw, ggbugr, uru, uwwwubr, gugb, bw, rrubb, wrbub, ggw, bwgb, ubw, gbbw, gbb, wugbgb, rbr, bgw, wrw, rbgurg, gbw, ggg, uggw, rwgrub, bbgwg, uug, wbgbwbg, ub, wbbgr, br, wgrrgg, urubgr, wwuw, ruu, rrwguug, bg, bgrwbbu, ubg, ubugu, gwr, rbuwg, gw, b, rgubw, wuru, rbgu, gur, r, gww, grwrg, wwrggguu, grugwrw, bb, uwbgb, wwrbu, bbr, ubgwwuu, ubrr, uubwrub, ruw, bgbrr, grr, wrr, bwwww, ug, wggbgrb, uwwg, wbgbbu, rrurgu, rbrr, rguwrgub, wuurb, brwu, rgw, ggb, ugbr, wwwuu, gguu, urbrug, ggr, wrrbg, brg, uwuggb, wuuggwr, burg, ruwgg, bgbwubur, grbrg, wbbrb, bgwbr, wbrugbgb, rwgr, wguu, gruugwr, gbu, brru, grurgw, ugbw, wgbb, rb, gbgrrur, bbgrg, gguwr, ugguwgg, rbbwbr, uruubugw, gbubw, guubg, bgub, wuuuu, wwr, bur, bwb, uwu, bu, ugbrgr, wubu, bbu, rgbbu, wuu, g, ggu, uwrrrr, wuw, rgg, brbuwg, wubuwwbr, bbwwuwbw, wbb, bgrug, rgrgbbg, bwruwr, rwug, guwbr, gugrb, gwuuuu, rrrwr, ubb, gggwrbu, wwugb, ww, gwbwg, bgbr, bgwbrg, bbbb, ubrgwb, bubb, bgurg, rgrwwr, urwbru, u, ugrg, bgburw, ugggb, grrrwrg, ugrgrr, brwb, rugbwg, wgg, ugbgru, urguu, uu, ubbbug, uguwguu, gu, rub, uur, gguuwu, uw, bwbwgrg, gbgwb, rru, rwurw, uwwu, rbrur, brr, uwgrb, ggur, wuwu, uwwr, buwugww, rggug, www, ur, rrr, rbwggb, bwubg, wuugubu, gbwwgug, urw, uwb, ugu, gub, wbu, wrgu, gwwbbuur, rwwg, ggrgbgbw, rw, gwg, grg, wggb, urbug, wruw, wrbbwwru, rwuu, gubu, uuwu, rwuwub, ugbg, guu, uwrug, bwwrg, gggr, bwrw, gbr, gbrr, bggbwr, bbrbwug, rurbru, wgw, uub, gggrwug, rrbbrrg, wru, gb, rrgw, rwr, urwrg, gr, ubbw, rugww, bwbg, ruwu, rwu, gbbr, rgrwbw, wwbbrw, urwggrub, rbb, bwwu, buubbrg, urwr, gbbrb, ugb, rgb, rgug, brw, bgbguugr, rbwgu, uuw, rug, rg, ruuurb, bgbgwrr, wuwg, urb, rgrrur, bbuww, bgubg, bbbu, ubu, ggbrg, gbwbr, gru, wwbuww, rbu, bgu, bugr, rwuuu, bgwrrr, rugw, ubuub, buur, wrg, gwu, bgr, bug, wgr, rurwwwg, ugrrgwww, wb, wwbb, gbgr, uuwrb, bgbbgb, uuwb, ubub, bwu, guggb, gbbrww, uuub, urbb, wbuuwu, ubbgb, rrw, brwgwr, bgubb, urg, bgg, ubrg, rrrur, grbb, rwrbur, wrgrg, grwubg, wbwggbrb, rww, gurg, bbb, wbg, wwbur, rubuguw, rgu, rgbu, ggwr, brruw, gurub, buw, gubb, gggg, wuur, gbbbwgb, uurg, ubrrg, guw, ugwggr, rrbbw, gubwwruw, gbgu, bwwg, uwbugg, ugw, bbggbgr, uggwu, uwwb, uuu, bww, gwb, bwububwg, grubbw, bbgb, uubwgwwu, wbrugw, rugbb, gbg, ubr, gwurru, ugg, rwb, wrwu, bwg, wug, rbg, brbg, rugrw, bbg, bbggubww, bgb, wgrrg, urww, wwu, rbw, urbbuw, wg, wuwbww, urwgguuw, wubbwr, brgrwg, rur, bwuwgu, uwr, rrb, rbww, gruwr, uwg, wu, bgugu, urgg, bru, ggruuub, wbbuugw, rgbg, grw, grgrur, rubbrub, guwb, rrwu
bgrwuwurrubbrrguwwgrrguguwgbwrruuurgwbwbrguwggrubu
uuguuruggugbgrwuggrubbbrggururrugwgbgbbwwrrguw
urugwwbbwwgbuubwrugbggrguwgwgwgwurgbubbwrrbuugugr
wggugugubgrbwuugbbbuwuuugguugwrwwgugrruuubgwggguww
wrbbrrurggbwbgbgbgwrwrrugwuwrrgugwggburugrggurrgbr
rbuwugbgggurggugurrbgururbbwuurrrguwugruwuwgubw
rrrburggbbwurgbbrbbwubrbgbwubuwrburubbrwwb
uruwwggubgwbubbgwgbrrbbgggbggugrgwbbubbgugrrbw
wrbugwbggruwgbgbugurruurrggggbgrrgwubggrguwrgruwu
wrbuguwrrrbuwuuwgrrrbgurrbwrgruuuruuurggbbwrrbruwu
bwgbrgbgurrgwrgugrubwgrrbrwububbgurrgrbbggrwbbururgwbbuuru
wruubugugrurrgguugurwwwubguburbrgwgggugwgbbbubuwgbguguuguu
wrbbrrururwuwgbruwguurrbgbbwrrbgbwggrbguuugw
wbbwgggbrurgwrrugbbgbrubrwuwwrrbbruubrbbrugurwrrwbwrwg
wrbwwwbwrwuwrgbwgrwuuwruwwgrurggruubruruuruugbgu
wrbwrrwrgurrrrgrbuuwwgwbbgguubwbrrrwgwgggrbwrbrbugggrbugub
bguuuguwrbubwrwguwurbuggwgbwbrruuruguwwwbgwuugwrugwurggbgr
wrbgbbrwgwugrwurwbbuubgrwrubrwruwrgrguuruwuwbugurgubrb
wrburwrggwbbrwgggwrguwrgubbggrbgrurgrburrbbuwgrugu
rggububwwwgrggurgwwgbrbugrggggwwgguwggwgrrurrruwwwww
wrbuwburugrubuuugwwwwwbbwrwuugurgrgrbbbgwgrgrrurrbbgrbruwwwu
urgburburubgwruwbwuruuwrrbbubbgbwuuruuugrwwbwgggbbrbgubuur
wwuguwuwwgbuugggubgbwbwurggwubrgbubwwuggurg
wrbwuwrbgugwwrbgbrrrruurwggugubgguwrwgurgrrg
grwbbrbwrurgubbugwrbgburgwbwwbbbggwurgbwbbuguuwuwrgbguw
bgrurgbrugbbgwwrrrugwrbugrbuuguruwbbbrwbbwwrg
wrbrgubbbrbbgwwbbrrwbggrrgbgbbbwubuubrwbgg
rwwurwwwwbwrgbrwwgwwrurrbbwgrbugugwrbwguwgurwrb
ugggrwrrrubgurrrwbgruwugubgugbwruuwgrgwwwugbbbguurwbwugr
wrbbwwwggrbbguurbrurgruubugbubbguugugbggubwbuuugbguuuwwgbrrg
uuwurrbwrbbbrrbgbuuwuwwbrbgrgwbgrrwgurwubr
gwurgwuwbbbbwruwrrrwbugwguburubgbbuugrgrrwwwrgbw
wrbrgbwbgwururgwuwggbbbgbbubgrugbwgggugugbugwbrwugwbrrwurbgr
wrbbbwuruugrurgbwuwrgrrbubgbwuburrrbbgwbrgrrwggbbugwuwwrruu
ruwgwrbbuwwrbrugrwrwurrgggruwbrrwbwbbrwrwbbrgbgr
ubbrrwbruruuwwbwbuggrwgruwuruubugwrguuggbgbrwubugr
wubrbwbbwwwgbwwbwburwwbubrrbbburrrurwbbwwubrb
gwbwgurwbggrwbgwbgubwrrrbwgwrgwuurgbwubggburrurwugwbbbrg
wrbbbbrruburwwugbgbgwrgwubbggbrrrbbuwrbwwrbbbrwwwwugwuwugr
gbuwbwwwrwuurwgwwbbrruwwwburwuugbwwwuguggb
wuwwgbgubgrwguwrbbbwruurwugrurwwbuuggurgruwuwwbrurgruwrub
urgwwuggggwuuwrrbbrwrrwrbgubgbwruwrwgrburubrguubwggwuubw
uguburwbwugbwbwrwgrgwgrrrururgwubwrwrbwruugwbgwwwgug
bwuwwwbbgubgrrgbbbuwubrruugrgbuubuwbwwrwbuugbruuwbuw
rrbbwbrubgbgbgubrwubbwggubbrggbuubuwgbwbbuuubbubbrrburbuwu
bbgbggugbugbwwubbwurgbrbwgrbgbwugwgbugruubbbu
wrbbgwrrrugbgwbwuwggwbgwgbgbrwruggrwgwggwruwr
bugbwbuuwuguubwrrwwurbwgwwrwburguwwrguubgu
gbbuurubbbrwrrwgwbbbwgubrwrgbgguuubbguuwuwbwuuggbgwg
wrbrbruuggburugubgbbrgubbugwbrbruuwgguubwbbb
wwbggrrwggwbugrgwguugbburguuubrrrbuwrgruwbwrwbru
uururuuruwwbuugrrgguwgwuggubgbggbuubrwrrbgrurrwwgbbgg
wrbwwwurgrururrgbuubgguubwgwwubuuububrwguwwuu
wgwubwrgwrwgrwwrbrubrwwwguuwgbrgwwbruubwubwugrwwubw
wbbuwwbwgbruugbwrrbguwgrwgrgurbwguwwwrwwwgggu
uububgbbbwgugruwuwuuwbgrurrrrrrggbbbwrgguggwuuuw
wrbuugwrrugbwrwurbrugbruuuwwguwwbwrwbgruburwwwrwgru
wrbuubbwwwbugbrgbuuuugugwwruubwugrwbrurbw
brguguwbburrbubrrgwgwburuurgrggggbuwgggwuuggubbuubburwr
wgrbbwbbrbgrgburwguwuwuwwuuurgbwrbrwurwrrrgrbubrwuwu
wrbbrrrbubrbbuuwwgwubuuwgurgggbwwuuuwbwububwggugrubbggwwwwbb
gbwwrbbgggbrruwrrrbwgwwgrbbruguwgurwuuwrbu
gbgrwwggbrwwwbwgbwubrrbburwuwwgwgbrrwwwwurrbuwrgr
wrbgrwguwrrwggrrgbwbrrgwuggrbuwgubugruub
wrbbrbbrubrrrgbrbgubrwgwuugwbrwgwruggwwwububuurrgurrwuwbrruu
bggwwbggurggbbwbbgugwbgrgbburuwrgwwgrbbbbbwguwr
wrbrwrbwwuurbwbgwbuggwbrgugwgwgrbgubgbuwbgwbwub
uwwbggwruwwwbgrrrbbwggbgrubrgugrwgwgbwwrugurwugwgrb
ggubrbgbburwgrbrugurrrbrwgrgrubrguuwwrrugrggggubrrgr
wrwurggwgbwgruuwurrbwwgwubrgbgubruggrwggwrggggurrgrggwgww
gwrrrugugwgguugbwgbguwubwrruwrbbbbbgguwwgbrwgruruuubwrb
wrbrgugrurbbbuwggwuwgrgwgwrgbrggwubgbbwgbwwrgrwguwb
ubbgrwrrrbgwwwrrbgwbgrwrguburbrwurrbubggwrggrubg
rrggwugugrubbbrrurburwggwwrwrrbrrurbuurbrgruubrugrrrgrwbgu
brgwrrbggubbuubuwwwubwugggrbggwwubgwggwrbuwrgwg
urwgrubggggbbgwrugrggwurrbrgbbgbugwbrrggrwrgubrbubgbu
rubbguuruburwgrugrwrbrgburwwbwwgurugrgurgrwrrwurbwguggr
wrbuburbrgwubrrbrrwrwrugugbubgruuwubgguuuwwu
wwubgwbrbbbbburuuwrwgrgbbwbrwwwrbbguwgwwuurubrwggrwurug
gbbgbgwwgrbbuubugwurggbwrbubgbbbwbgrbwwugbrggbgbuwugbwu
wrbbbbruguguwuggbbgwugguggurrbggbgwgrrburubrwrwrr
wrbuwuwbwgbrubbrbbrurgbbrburwrgwwgbbubgbbbggrbgw
wuurruggggbuurrrwbwubrgrwubbrggrgrbgwuruuwuuruuw
bugbgbruwubrrguuuuggrrrgrwgwrwubwgbbburrwwgrggwurrwr
buuuurgubwwugrrwgrgubwrrwugugwuurubwwubrbgb
rbguwuwubuuuuwgbrbugwbugurggubgubgwrwruwrbwurrgg
wrbwwgrggwbwwwwrwwuwrugrgbbrbrruwgrguwwbbwubbbugrrgwwwub
gbubwgbuwwgbbubbwwrwwggrgubuuubgrgwuuwbuugbbgbbrgwwr
rbwruwbwuwuuwbbwuwrwwubwgrwwbrugwbwbrruuwuuuurrwbwbub
wrburbbuwbbgwbwwgbrwgwbwgbwubrwugwbgubugrgurrbuurrwwrwwugb
wrbuwwrbbrgbrgrrbrugurgbwrrrrwrwugrbwuwrbgguww
bwbgbbwwwggrruggrugrrurubwbguuwbbubggrgrwbw
gwuubbbubbgwurwugugbrwurbrwgwuuwrbruggbbwwbbwbb
ubrbgwrgrgugwbrrwwbgguwrbbuwrurbgrubwrruubwurbwbwwwgwwbw
wrbuwwurgbgggggrrbbuuuubrugbwuwugbrgburuuu
buguwguwuggrbwgrgubwgwrrbwrwgwuuwubuwwbrwbbugruwubw
gururrgrugwwrwubrgggbgrgwuugwrguwubgubgbbuubruugrgr
buuwubbrggggwgbwwggrgbwrrwgrrwrruwruwwgbuugubbubu
rrgwbuwrwrbgwwurburubbbwwrgbbguwrrggguubwwwwgruuwuwu
wguwguwrwrbuubbwubguwrbwgurggwgwwuubwugrgbwguguuu
ggrguwurwurwgubuubwgwwwuubrbbwwrgbrwgbgrbu
wrbbrrbgrurwbwurrrguguuuububbgbgwwgrubwbrrgburbg
ugwrguruwwubggggwuugwgbuwrwrbuggwgbgrgrubwububwgwggwgr
wrbrrwbuwgruugwwgwrgwgwrubrrugugbwrrgrbrubrgbrrwgb
wrbwruwgururugguuguwbgwwbwbwwubgwgrwwwwgg
wuguugrrrgrgrrbwgurrwbbwgwbbubwrrburgrgruwuwwbuubgbg
gwbbrbggurgwuubwwugurbggugguuubruuggbuwubruggru
rgruubbrgbbbuuguuugburwbrugbwwbuuuuubuwgwgwbgbugg
wwbuuggrgwggrubwuwugwwgrbwbgwgrwgubbwwbbgrgugwgggubwrwbbg
wrbgrurgrgrbbbrrbwwrugbubrgububbggwgurguruubugwbrbg
rwbrbguwrubguwurwwgugrbbuwbgrgbbubbrrwguubggugbbbbgbrgu
wrbrwgwbrbrbuwurwgguuwrbrgrrrggwuwwgwbrggguurbruwwgu
wrbgwubrrurrwgrbwgubugwgbbrbwggrrrwwbubgwggrgggwuuugggbwwwgr
rubgwrrgbwggwwwuggwuuwwbbwrrrbrgguurruwbwruuuru
wrbbgwwgrrbwbwbwrwwwwrbbbrbrrrugbrbbrrugrgurgbbbgrgwwuwgu
rwgbgugbwgbgrrgubrrgwguwwbbbrrbgrugbgugrgwug
wrbbubrwugrrrurgbuwubbwbbwruwguwwurbuwrwgwwwrrrbgwbgrrggbgr
wrbbbbwbrwuurgrgbwwwbuurwrbwrgbrruwurrrgw
wwrbuubgbrrwwrgbbbguuugrwrgrbrbrgrbwwburug
gguwuwburwbrwrrgurubgrgbrrbbgurgbwwbgburwubbwgrgbrgw
wrbgbbrrwwubruwrwrrwwbrrwggbbgbwrruggguggwr
ubwggbguwbubburruwrrwubbrugrbbrwuwwugrwruwwrubuurguwuurwu
wrbwrbwwbgugrbbbbwrwuububuurbbwuwrwgrgwgbgruuwrgbuwuwgb
wrbruuwwubwbgwwwwbwgwugwgwbwuguubbbbbgbugugwwwugwgbgrbbgugug
buwrggrgrwurgrgwwuwubgguurwrrrbgrgrubgbwgwwbrgwwrbrbruw
guguwugrgubrguuwwbgrbwwuuuubguuggrrbbuubububgrwgr
wrburgrgrgwbruggurggrgbgbwgrbwwrurwwrrbguugbrwwurwwubbuu
rgwbwgwuggwgrgwwggguruwwruwgurguruubbgruwbbwgbwrgurw
wrbbruugwwgbbubbrburwbrbrbwggrrwbguwbrbrrbgbgwwrgb
ggwurwugrgwrbrburwuwbbbwrrrububwbrurrrgwwwwuuugbwgbwrbru
wrbgrbgrbgwrbubwrwbbwggrwwuwwuwgugbbgurbubbbuuwggr
wrbburwrgruuwuurrrbbrgbwbbwrbubwrguwgwbb
rugurugrwrgrbwrguwwuubgrrrrggwrwuwwwrrwrggbrwbbu
ggrbwgrgbwgrrugggwrbgrguwubburggbugwbwgguwwruwwgwubruwggg
ruruurbbwbgwwggrgrgubggrgrubrwwrwrbbrgugbrrgwrwwubrgrurggg
wrbwgbbuuggurbrbbrgrrrwbwbwbwrbrguwugrrgbbwrgrbbgwuurgbwbb
wgbrrrbwrguwbgwrgwuuwrubbbrubgwgrwrrbwuurbbggrrgbu
wrbwwgwuwbrubgrbwwgurwggubuuwrbwubwuburrurgwrwbbgruwguw
wrbbrrwrgrbuuwuwrbbrgwbgwurubbrbrwrwubgrbbbbubggwbgugrwgrw
rwrrgbrrrgguubugurwwruugrrwwurrgugrburrwbrguruggbggbrgu
wuggrbrwubwbbuwbrubwrugbuubgwurbwbwwuuguruubrbw
wrbguwbrrbbuurrburrrrgbrbwbgwrwrwwrbuubwubgwgwwwuguugg
guwwgrrrrguwbwrgrgbugguwuwugrgbwrugbwrgbwgwbgbbubgrgrwr
bgubruurrrrwwuuubwuuwuwwrbbgrwuwruwbgurwrugwwrbgw
rbubwrggguurubguuwbbrguwrwruuwubwwwgwubbwub
grubgwbrrguwrguwwrwruuuwbwgbgbubuuwbwbwrrbrwrgrugbwuruubb
rguwrgbguururrwbwruugrrrbuwwrbbbuwrrbgubbwwurgwrubwbwwwuwu
gruuwbbbrwururwuwwwrbburwrggurruwbrrwggrrwrgbub
rwwrrwwbuuwgrbrrugrrrubwuwuwrwbubbgwggrgbggrubruu
wrbuguubwgrgwuuruwrgbwbugubwbwgbuuwrrbwugwrburwur
wrbwwrggrbwwwwwwgwrgbguwgruggggrrbgbruuuwgwbwgubwuwb
wrbuwwgggrrbwgbwgrbrwuruububugbrgurwrrgbwgbuwubgwbwgu
grrrbggurrgwwbbwruurrrbuguurwgrwwurbbrwgubrrgbuwrwugwwguuu
wrbrruwbrwbrruuuubbbgwubgwuuwubuururwrugbguguubwgburwgu
wrbuuuwugugwgrwbwbguugububrrrrwwrggguugwuuuwg
uwgguuuwrgugrggbrggrgrwuruggwrgbuwwrgrrrrgrbugwbbwb
wwgugbgrrruwgrwwgggrururgrrurrbburbgrubruurbwgugggu
gwwwgrwrgwgbwbggwbbrurbgugbwguuggubrbwwbgbbwurgrwg
gbgwbbugrwuggggrwubwbubrrwbuubbwbgwbbbwrgu
bbbbrwggrbgubgwrwbuuwwwbgbbbbbrugbrgwugbwgrgrubu
gwbbbubgbrwggggwbwgbrbrurubuugbrwbrrbrubwr
burugwuggwuwrwrbbrbuuurubugrwwububwbgrbrbgrrguw
rguwrwwuuwgbugbrrbrbbrugrugguurbugrubrwuru
wrbuggrgrruwgrugrubbwgubrwrgwwbbuurggrgwggwubug
urguwbgurbrwrubburgbgubrwwwruwuugbbrrrwrrgwguwwrrgg
ugbuwugrbbrwgubrwwbuuguwbbrbwgurwwbbbruwrrgbrbruwuwgbg
gugbwbbugwubbwrwrrrrwrubbwbrgbwwuuggubbggwgww
wrbuwgwbwgbbwwbuwrgugwugrruuwrbgrurbrbubrrrbbrbwbgugb
wrburwbrwugubbggrrrrwgurrguwwwrrbbwwwbwwwgbbwbwbgubggruubw
brugrwwbbgrbrrgbggwrrguwrgbgrbrbrurbbrbbug
ggubgwwuwubwurbuuugurgrwwbgbgbugrwgbrubrgrbbwbuubrrbgr
wrbburgbbbrgrwuggrbbgbgrbrwgwubgbgwwuugbrbrwrguruggwggrbg
rbubburuwwgrruwuwruuuwwwwwwgbrrbwrrwwwggguuuww
wrbrrbrgbggurrwbguwwgwuubwgggugugrgrwgrgrrurgwuwbwurrbgb
wrbrwwubwgurbbwuwwruubbwugwbruwbbuurrbrrbbuwwggurr
wrbgwrrrbguwbbuwgbbgwrggbgrrbggggwrrbbrwugrrwgbbwuggwwbrurbw
wrbbbbbrwbwurwbgrrbbwggguburuuwrgrrrwgggbu
wrbrrrrwbbbgwugruwwuurwrbwugbwrwgwrggwbggbgggg
wurwrbrruguwrrrruruuguwwrbwuugrgrruuwuwgbwrbgrwbubbrwruuuw
brrbwrbgbbbuwbgbgrrbwrgrwbuuurgbuubwrguwrggrgrwrrbbg
rwgbrbbbwurbggbgurwrbuwbuuurrrwgbburwrgwbwgrwrguwwguggbu
brgwurbuwbrgrbburburrubwuwgrgrrbguuwwgruuurruugrurwwgbbrg
gbrwbwbuwuuwgubbbwwuwbwggwburbuugbrrrrwgwurwrwgrwrgrbruur
gwbrbuwbwggbrbggrbwuuwrubuggwrwugwurwuuwrwggwbruwruugbbu
gwwuugrwbbgwgwgbggbwwwuwbbuuuwbwbgwwrrrruwbuugburw
wbwgrgwgrgggwgrrrgrbwgwgwbbgubbwguwuwbrbgwbbrwrb
rwrrbgugwwrbggruuwugrbubrrwgurugrruurbwgburww
ugubugwwrggggubugrwgrguubrubbwuuwgwuuggbuwrwrggrwbrr
rgbwwbrwrwwrwgwwwwwrwwwwgubwbbbwrrwgwrubgbwwbgrr
brgrbgwuubggwruugrwugbuwbbbgrwbbgrwwwugubgrugubww
gbrrbwwwbwwrrbrbubrwwurbgbburrgrurgguwbrgrgrwwru
wrbggbgggrwwwggwbguwbgurggbgbwwgbbgugwwuuuubbwgbrgr
ugggrbwggbwbuwwgwrgwbgurrbubuwwbrrrwuwuuwugww
wrwuggrgwwrruuwrrggwgrwgwurwwuubbburgbrrbwwgr
rggugwwrrburwbbrbbwbbruuuubrubgrrwguugggrgbrwburwuwwwwr
ggwgbbrwwugwrwgubwburwrbwrubgruwwrgbguurbgbgggrwgg
wrbbwgwuuubrgubbgbrrgbuburrbgurwbwubbubrbgbwu
gbggwgrgbrrgbgrbwwugwuwubgwgwrwwrbubwbubwwubw
wrbuubrwrgubbggbbrgbbwgrbrurgguwugwrubuugbbbuwubru
ubwbbrrbrwwbwwwbuuburrrwuurwburbwbgrwrbrbggu
wrbwwubgrwuuwrwrbgwrburggwgwwbwgbrurwrrwwww
wrbrgbrrrrugggurwrggrwgggggbrbgurgubwwruwbgggwurbbwbrbuwguwb
ugbbbbbbbwburwrwbrrrgbwrrburbuwrbubrgbrrggwwrrbbgwrrggrgr
rrwuwbbrgwbwwuuwrwgwrwubggruubggruuuguruubwrbwwggbwubgggu
wrbrubgwbbubwbgurwrrubuubwwwuruwwbrubbrbguwuubrrwbgg
wuurwwrbbbwwuubwgggguurbwugurgrrbuuggguuwwurrr
wrbgrrurrubbuwgurrrrugrwwbugbbgwwgrbrrubggrugugrgwburuwug
guurrwuwrrbuwgbrgwrguwgurgrwgbwwubgubrbrgwbrwuuubguu
wrbrrruuuwgbwruuugwbbrgwrrrbrwruwubrbwgbbbruu
grrwruwgwgrbbgrrrwrwbubbrbbwrwgururrruwgwbwwwwrbrwwbwg
wrbrrbbrbrbrbgrbbrbrbwwbrgbubbgggggrgwwbb
wrbwbgggwbwbgbwwuruuurrurbbggbgbgbbrwbugwrrrgubgburbwgwgw
rrgwrubgwrwrwubrrrwwurwwgwgrbbgwrrbubguwurruguu
wrbggwwbrwwbubbwgrguwwruugwgugwrggguwguwruggwu
wrbgbgbbbbrgbbggubwwgbwrwuuubggwuubwwbrubwrggwb
wrbrbgbgwbbwruugwggbbbrwwbgbruubrwgubgwgwrrrwwwrrgrwrrru
bgurgrwruuruuwbuwrurbubrurwbwbwwugurwbgbbbrbgwgggggwug
gbwwbbgbuuruurgggrubrggurwuwuwgbwrrrggwwggwubururbbwururu
wwbwgbrbbuwggugbuuwrwbuggrbwbuwgwbwururwgr
uugwggrwgrurbbrwguruuwrwugwrurrwuuwwrgwbwurgwrwg
rrubrbgwbgguwubbgwwubuwrguwrbwwwgrurrwgugbuggwbgrggrguuub
bbgbugrgrubwguuwbrbwrggwrbwbrwrbwugbrbrurb
wrgwrbbrrwuwgrubrbrgrurwggrubwgbwgwruwwbugurwrubwgbwgbgrwrb
wbwgruugwwbrggburrgbbrwbguuwbwrrbubuubrwwgrgwwubbwgb
wrbrrrbwgwwruruggburgwurwwubbugguwrurgbgbwbwurwwwurbwrggb
gurbubbbbbwwrgrgbrgbguubbbugwrbrruuwwrwwguwrurgwrr
uwgwubrbguuguuwubggwbwbgwgwrwbgrrrugggwugbwbwb
uwggwuruurwwgrugurgrwrwbwwubrgwruugwruuggwubruwwwbbuubbgu
grrwurgwgubggbruwbuuggwbbgguubrgguuwbuwrbgwrurbwgwgbbr
buwwgugwrugrrbbgggruwuwrbwbrrwrwgwbugwrbbggbwur
bguwgwubwgrbgwbrrwuurwrgwugubwrbguburbrgwwbruggugwwurggu
wbbwbgbbgggwbrwwwubwrgrwwbbrbbwwuwbrugrrrurgu
wrbuggurwubbrgggrbugrgwuubbbwubuuwwwwururruwburrrrrwgb
urrruurrbbugbgwwgburbwwuuugrgrubuurggrbgrrbggbrwgwrwwubr
wrbwgwgwbuwrgbrgggbrwgbgwwrbuwwwuuruwuwgwrbgbuwwrg
wrbbugbuuubugwbgrwrbgguwrrurbbburgrwugubwrg
bbbrwbbrwgwuwurgbwgwrgbrbbbugwugrbwggrwbwubwbwr
rbrgggwbgwrbuuruwbguwgrugurwbbbwguwbgbbwbgrbgwwburuububgb
urggrwubwwwwgrwwggbrurubuwbbuwubrbgruuuwugrwrwrwbruwbuuw
wuwgrrwurwrrrgbwubwbbgrrgrgrbgruuwwbbwurubuuwubrwgww
brbwrwwwgwrgwrbbwwruruwrbwurguwwrrburrggwubwgwwrwrgrbwbru
grbrbgguguwrwuwuburwgwwbgwwrubbgbrbwrugbgbguugrgg
rrbrruwgwurbguggbwugrugrggwrgbrwgbubwbbguwbwwgbg
rbbrbuwuwwubbrbgbrbggwuubwgbgrbwrrurgrggubbuguwwwrgrwgw
wrbgrubuuwwguwgubgrbbwuwwgrrgwubwbburuuugbwgwwbwwb
wrbgbrbrbugrrbrwbwwggwgrwuwrwbgrbrugbrwgbuurrwggrwruuuwwurwb
wrbwrwwrwubwbugrwwrwwbrrgrubrurwbwggbrbwwbgugrburrbggurgugr
wrbgbrwwwgwggubrwgwwgwwbggwrbuubgbgruwubuwwbrwwbubruug
rubgwubuuwbwubrgubrrrwrguwwbbggubwbwgbwrwbuguwugwwrb
wrbwrbrruwbrburbrggugwwuwwggggbugubwuwbuurwguugurrwbgrbgruwb
bwgwwgwbwbwrbbggbrbrgbbubbrugbuwwbrwrrgbgrgu
urggubbwbrrwrbbguuuwgwurggrrrubbguuurbbwgrugbgu
uguwrurbggrgurrurbggwguwuwrgrrrbwrbgrrgbbggw
gwrubwrurbuuwgubwrgrwurwwruubbrrgrggrbbugb
bwbrugbgburgbuuggguwwwrgurgbgrbrrgrurrbbuuugrgrgwuwwbuuwgb
ubrwbgrrbuburrbbwbrbwgbwuwwurwwwuwbubbbugwwwgbbwwuwuguwurw
ubuurbrwurrwurgrugurwgbuwuugrgwgwburrbrgbwwwwbww
rwbrugbbruruugwgwbrwubbrburgbwbbwrgwwubwbwrugrrgwwwug
wrbuwbrrurrrrrrrwguurwgubrbwbrrwrrggggrubgrwur
gwgrbbuuuwrwgbrwbuguugbgrrrwurbwugwggubwuwbgrubrruww
uugwbbggbrrbguubwwgrrgrrbwwgwrruwrgwrguruwbbwbguuwuuuguw
rrubuwubbbrwbbwuwbbbbrwugwwbbuuruwgbrububggggrwgg
wrbrgwbuggwgugbwwwwggrubrwwubbburwubwbbrbwrwwuwr
wrbrurgbbwwuggrggwrrwrbwgbwgguuurgrurrwgrbrrwrwuugbbrbwgr
ugrbgbbguuwrwwgwbrbuwgburgburgruuwwwgrwgggbbg
wrbuguubrbrggrguugruwbwwbguuwurwruruggwbru
grwrbgwruwwbgbggrwgrggwrbrruuwbbrgrwrubbgg
rrwrrgwrwbuwgbburbubwgwgbbwrwrubguuwuwbggwugbgwuwurg
bwgrwrrgggubwrbwrwugbrrugwwbgbrwrgbrrugruurw
wrbbbuwwwrbrurwwwwurgwruguwuwbwbuwgbugwgwgubggbuubwbbwgbg
brgbgrrrgurbuguwbgbbruugbgurruwububububrwwwuwbrrrrgr
gwruuuuuwwrruugwwurwwwbubuwwrwurwwubggrwgwwuwwur
rbrwwuuruuwwgbbwrrguwbwggwbrgbbwguwrwuwbugg
wrbwurbwbubwbwrwugbggwwurbwuwbggugwuwuwgu
gbrwubugrwrrwbubbwbbgbwguwgbwubgurwuuuurubuwg
gruggbbbuwwuubrbgbuburwwgubruwbuwbrrbrbwugggurburbrwrg
rubwbwbgwrugwuwwrwgrrubrguubwwubrwbwuwugrggug
rwrrrwwbbwuugwuwwuwubbbwruuguwbggubbwrgbuw
wrbggruubrgwugrgubuurbrrrbubbugugruwggbwg
bwbugrrggwrbgguugwugrwugurugggwbrwbwwwururbgbrrg
burwubuwubbwwwguuwwruubgggrgbgbgubgbwbwwrb
wrbuubuwwugbuugrwwbwggwggbbuugbbugrbwruwuw
gggrugbrububugbgrwburrwbggbruwbgwgbuubgwggbgbbw
ubuguwuwuubggwubggggrrbububwgugrgwurbbrgbrugrrggrggb
brgrbwrubwrrgugbruggrwbbrgrbwugubbgbwwwwbugg
wrbbugwgbgwbgubuwrbrbbuwubbrggbgrrwgbrgwgwrrbwwuruuugrgu
burrurwgbgruubguurrwwwuugugrruwburbubbbuguwwuuwgr
wbwrgwwuruwggbgrwrurwgburrwggububrbrguwgggrrr
bwgurwgwugwrwgbwuuuubbwuugbrwbbrrgbrgrgrwrrbbugrurrwuwrrr
ggrggbrgurbugurbuwwubgrggbgggugrrbgwwwgguwgrw
ggrwrgbuuuuwgwrgguguwburbggbrrwrwurwgwrgrbwwgrrrwrb
grrgwwgruruguubwruuwrggrubgwwbwbgbrurburggwgw
rrrburwuwrgbwubbgwrrrgwuwubrwbbuwwugrbgrbgwwruwrugb
ugurwgbwbbgbuwgrwurrbwruwuwbrbrgugwubgguuw
bbgurubuwbrrrwbwwwuwbbgubwbguwuwwuwuubrrbrguuurbbub
ggggwrbrggguubwgwwuwrwwurggbruguggwwbgbbgwuggr
bwwwgugwrbbwgwugrburguuwrgbwrrbubururrgbrwrwubwbg
urbrbwbbgwuggbbuwurgbgwrbrwgwwwwurwuwgbggrbwbrrrggbrr
wugrubbbuuuwrbburbbgbwwrgrrwrurwrbburbuwuwbwbgubu
rgbbrwwubgwbrguruurgggrwwgrugrwwurrbuwbgwggwwurbrwgbb
wrwgurwrgbgwubuwbgbuwubbrggrbbbrgbbwwrggguubruurw
wrgwbrwgrrwguwggwwgrugrbwgwgrrwurwgbbbugbubuwwrugwu
wrbwubrwrbgbguwruwwbbrrubbbwwuwbwurgrrrbruburwwuuuuggbwwbr
uurwwwuwrrguwuruwwwrbubgrburrubwwbrrubbwbwruubwgbrgb
uubgbubbwuurwguugubwrgbuwwugrrwrurwwbgbbgbrwurrwbuww
urrbuwwwgbrrwrruubbgbwugggugbruwuwbgbrrrrrubbbggrbwwub
gbwbgwwgwbubgbrgwguuggbuubgrbugwrwubwbgwbwwrrurrugrgbbb
wrbggrrurbgguuwgbgwrrrubwubururrwrurugugwwrggw
wrbwubuuuugwggwbwuwwugbruuugbuwruurbgggbgbguugruruurwb
wrbrgggrwbruwgrrggbuwubbuguguuugwguuwggrguburbrrurggburbb
wrbwruwwrwbrrrrwurrbubuwburgrwrrrwwgggubrrbb
gwgrbuwwwuubbgbrbbuwuwggwwrwbbwbrwuugwggwuwbrub
gugrugwbwgwgbbwwurubwrbgbbwwurggwgrrrggwuubu
gbuugbwbuugugbubgwgrubrrbbgbwguruubggwwbwwgwbuug
wrbbwuruubbgugrrrgbgbbwrwgbrrguwwwwuuwrburrguubgrru
wuggwbuuguwgrbrwwwbwbbbruuruwwwrugrubbrrrbgwgwbubub
ugwwugwguggggggbwwgbuwwwuubgbgbgwgwbbwgwugwggbguurwgruwub
bbgrbruubrwggrrrruwrwwgbgruwuugrgbbbrbuggruurgwwgugw
wrbbuuuwgbwwbuwuwrgrubwrugbbuuwgurbwrwwrrrwgbrrwbwwrurwbgu
wrbrrbggrrrrgrrrwugruwbuwwrbwbwbubrbrugrgbruurb
gwrgrwbuurgwwgubbrbggwwbgggbuwggrwgrburwruug
rbugrggwrgwrubrgrwrrggubgugrugbgbrbwuubbrurwbwwgr
wrbrwwuwwwwgrrrwwbuwwuwgbgrrurruwwwrwuuugwrwrwbbwrggugubrwwr
rgrgrbwbbubrrrwwrurbwrwgugubwwwwurwgguuwwguwgbrbbguu
wrbwwrwgrbgugbrgbbwwrbbwwruwugwgwrwrgurw
bbwuguwbbuugbrggrbgbrbuwggwbwwwbgbwrwwgwurbrwg
guwwubgrbwgbwuwubwbuubrwbrwbwbguuururrrgwbb
wrburruwggwgwrgwguugwgwwuggbguwuggurbruuwwubuwrbbwggg
gwgubwwuguwbbwuguwgrgrbruuwurwrbuggrwwbbubburbrrgwbg
ggugbrbbgrwgguuubrbwgburrwrwggbruugrgguubrwwggr
wuwugrwbbgguwrruuwwwuuugrbrbrgubwgrbrwubuubugwururuuwwb
wuwbuwgurrrrwwugbrgwgwrwrgurwggbgubwwruwbrruwg
uurwugbgwbbgrurrguwrbrgbwggrgbwgbruwggguubbubwgbbuguguwbg
wrrwrbbrrwrwugwggggwuwbrbrwuwbruurgwwuuwrb
wggwbrrurbbubbuwbwuurggugrggugwgurbgrgbgwrgguuww
rbbwwubbrbuwuwurbugbubgggwrubwrrbwwuuuguwrugrbubbrrggbuw
wrbguggwwbgrbwwggubbubrbwurwuurubgbburuuuwbguwrgg
wrbwuwrggbbugrrurbwugruuruuwwurugrbwubwbubrgugbuwwwbwuguurb
urbrgwrgggbwgwgubggbruubrguggwugrbwuburrbbgugbrrgwubwbu
wrbguwrwrwbwuwuguuwbuuuwubrrurwwrwuububuwgg
burruburbuuugwuuubgrugubwrgugrwrggwuubwbuuurrbuugb
buuwwubrguwwbwrwurwrgbbbrwbrugbbwgrggbubbbugbwgbwgubr
burwgrubgggbwwbbrbwrbbgbwruggwwwuwurrbrwrrw
wrbwgwbwuwgwrgbwrrbrgbggurgwggwgggrggrurwgrrgr
wrbwburrrbgwrrbruruwgwbwgbgwwburbrrrbbbbguwww
wubrbwugwrgrwwwwubbruwbwubrwrrrururuuuuwbbugbuwg
ugurubgbwuburrrgrrrgurrbugwrubrggwubrrrubwwrggr
bbbbguugwrbbugbgggugbbbubrubuwwbbrbubbgruggbwwrrrwuugrww
bgubgrrgguruuwgbgbrrwwgguwwuwbrgubwgubbuwrgwwrrbggub
rwrugbburrbbrbuwrrwggwwbgggwbuurbwggruubrrwrubrubwgwwr
wrbwrrgwgrrrgururwguuwrgbrbgbbuwgguugwubrrgwubbwuugbgwwb
gbbwgbbgrrwuggwwgwgwubwwwwubggrrwubbburgguguwr
gwwrrurgwwuubgwwwwugruuwbbgrguurbrrrguwrgubrrwbbguurrgggww
bbrbuwguwurgrrwruwuurrgbgrurwgurbgbgbwubwbrr
wrbwwwwurbwbbrgwgrurrrwbugwbwbrggwgbggbu
wrbwurrwuuwwrgbgbrurgwbwrgggugrwwbbrrgrbgbgbbbwgbrwbrwbuw
ggbuwrugggrgrurbgrgbwbrwuwbgrrwubwrrgwwuubgggbwbgru
bwrubwgrbgwguburubwwurbgrrubggrbgwrbrbguugwgwugw
wrbbbgrgrrbbuwgwggrwuuuggwguwbwwbgggbrurwwgrbgrwrurg
wrbuuwwgugbguwrwbbwwrugrwruwrrguuguwwbuuruuwugbugb
wrbuugwbgrrbbbugrwrwwrgwububgbgugrgwwwgbbggguububugrg
bggwuuwubrbbrrwuurbggbgruwrbwwugbwgrbwgbuurugbbrurubgbu
wbgrbggwwbuguurguwrbbbwwwgwrbuwruugbubbbrwwuruubbrrbrwbgg
uuwuwgggrwrrgurbwgguuugbrwwbrrrgrrbrubrrruwg
ubwubggbwggbbgrrrwbruurwgurguubrggbggubrugbrgrbwbubru
wrbwrwgurwrbbbbgwwrrbrggwrgwwwubwuwwugugwg
wrbburrwguubbgbbwuwubbgwrurrrrgrubwwwuggrwgbbubuwbuwbbrg
wgrrrgubggrburuwbbubwgrurbbuggugggrbbbwwbgggubggrwuwrrwbb
rgrggggrwgruuruuubbrgrwbgububgruuurrwguubwu
uwwwbubrgubbgbrbrbwwwrbuguuwrggrrbrgrggubgrgub
ururbuuuwwrwbwururrugrrbbwgwuuruwbbwrubrrrbwgbgwrburwrrgg
wrbrrggrrgbbrwruubbgbrbbbgrgrgrgugwggwgggubrrwwugbbbwrbuwb
wugwwubrrwwrgbbgggrgbgbwugbbggrbuwgugrwubgu
brrwbgrrwuggrbguwbbrbbbwrrrrgubugrbwrgrbbgrubbggubwwr
wrbwuurguurrwbrgrwwurwbrwbgwurwruwubgwbgugrg
wrbgugrburwbbwwwrwwwgbrbuuuwguwgrbrguurggw
wbrgugbwgguwguguuburwggrubggwwbugwurggwuwgururgrwubuuuwbg
wrbwbgugbuwrbbwuwrwugrugbbubruwurwrgwwrrbruwu
wrbrbbrwbwgrrgbwbbbwwwrwgwwwrrrwrugwgbgwwwrbrgwuwgg
gbugggrgbwrrbwgbuwrbgbrgrbbuguwuguguwrrwguugruwruw
wrbrrgubrggwwbuggubububgwgrwrbuggwgururwbgwbrrugwuw
bgbguruguwggwwwrrwbgrrrbubbuwrubgbuuurubgrgbgrwbb
wuugbwrrwggggbgwwubwwbrburbbrbwwbwbggrwrgbwwrbuwrwg
wrbrugurbrbwbruuwgugwggwgwwubburubrbrgwgwwrrrrwugwuu
wrbgwgwurrbwuwwwugguuguubwrbubbrwuwuruurrrwwbgwubb
ururbgwgubgrgbgwbwgwrgwrguwgrbrgbwurwgbbgbrrrwrrwwgwurww
wwuubwbubrggbuubggwbbwrrwggggurbwwbwbgugrugubwbru
uuwuwuurrgurgrwrguwbbugbruuubuuwbbgwbbugwbgrrwrruwbrbb
ruugrbuururgbrrugwgwrwwugbwwrubgwbbuubbrwgb
rwgbrwrrwgwbgugrggurgbwggugrrrbgwguggggbgugburgrwbwu
wwwugrbrgbrugurwrbggwwbbwwbwgwbgwuguuguuwwgrbwrwwr
wrbrwrbrurbwwuggugbgggwwrwwgggggggwbuugwbrr
wrbwgrubgrwwubwrububgggguguwbbrrrgrgggbggrbgwbrrrbwuwbrrbr
rgurgrgrrguubrwwbgrgbuuurubruwrbwuuwbuwwgbrb
wrbbbbwggbwgbwbrgrwuguuuwuugruwbrugbgbwwgurbubuguwwb
urgbgugwbbwrggrrubbgurwurbwuburwubgrwubbwgwgrgr
wrbwrgubrbubwubwwbwruwurgwurbwugruwrwgrruuguuwrgwgrurrgg
rgrrgwwruuubgwgrwbbrrbwrruggurwwggugbrbbgugrgubwg
wwgugrrbwubwrwwggggguguuwuruggbgburbbbwburrb
wrbwurrrguuwwuwuwuwgrggbbwrwuubwwggurgbbwg
+189
View File
@@ -0,0 +1,189 @@
--- Day 20: Race Condition ---
The Historians are quite pixelated again. This time, a massive, black building looms over you - you're right outside the CPU!
While The Historians get to work, a nearby program sees that you're idle and challenges you to a race. Apparently, you've arrived just in time for the frequently-held race condition festival!
The race takes place on a particularly long and twisting code path; programs compete to see who can finish in the fewest picoseconds. The winner even gets their very own mutex!
They hand you a map of the racetrack (your puzzle input). For example:
###############
#...#...#.....#
#.#.#.#.#.###.#
#S#...#.#.#...#
#######.#.#.###
#######.#.#...#
#######.#.###.#
###..E#...#...#
###.#######.###
#...###...#...#
#.#####.#.###.#
#.#...#.#.#...#
#.#.#.#.#.#.###
#...#...#...###
###############
The map consists of track (.) - including the start (S) and end (E) positions (both of which also count as track) - and walls (#).
When a program runs through the racetrack, it starts at the start position. Then, it is allowed to move up, down, left, or right; each such move takes 1 picosecond. The goal is to reach the end position as quickly as possible. In this example racetrack, the fastest time is 84 picoseconds.
Because there is only a single path from the start to the end and the programs all go the same speed, the races used to be pretty boring. To make things more interesting, they introduced a new rule to the races: programs are allowed to cheat.
The rules for cheating are very strict. Exactly once during a race, a program may disable collision for up to 2 picoseconds. This allows the program to pass through walls as if they were regular track. At the end of the cheat, the program must be back on normal track again; otherwise, it will receive a segmentation fault and get disqualified.
So, a program could complete the course in 72 picoseconds (saving 12 picoseconds) by cheating for the two moves marked 1 and 2:
###############
#...#...12....#
#.#.#.#.#.###.#
#S#...#.#.#...#
#######.#.#.###
#######.#.#...#
#######.#.###.#
###..E#...#...#
###.#######.###
#...###...#...#
#.#####.#.###.#
#.#...#.#.#...#
#.#.#.#.#.#.###
#...#...#...###
###############
Or, a program could complete the course in 64 picoseconds (saving 20 picoseconds) by cheating for the two moves marked 1 and 2:
###############
#...#...#.....#
#.#.#.#.#.###.#
#S#...#.#.#...#
#######.#.#.###
#######.#.#...#
#######.#.###.#
###..E#...12..#
###.#######.###
#...###...#...#
#.#####.#.###.#
#.#...#.#.#...#
#.#.#.#.#.#.###
#...#...#...###
###############
This cheat saves 38 picoseconds:
###############
#...#...#.....#
#.#.#.#.#.###.#
#S#...#.#.#...#
#######.#.#.###
#######.#.#...#
#######.#.###.#
###..E#...#...#
###.####1##.###
#...###.2.#...#
#.#####.#.###.#
#.#...#.#.#...#
#.#.#.#.#.#.###
#...#...#...###
###############
This cheat saves 64 picoseconds and takes the program directly to the end:
###############
#...#...#.....#
#.#.#.#.#.###.#
#S#...#.#.#...#
#######.#.#.###
#######.#.#...#
#######.#.###.#
###..21...#...#
###.#######.###
#...###...#...#
#.#####.#.###.#
#.#...#.#.#...#
#.#.#.#.#.#.###
#...#...#...###
###############
Each cheat has a distinct start position (the position where the cheat is activated, just before the first move that is allowed to go through walls) and end position; cheats are uniquely identified by their start position and end position.
In this example, the total number of cheats (grouped by the amount of time they save) are as follows:
There are 14 cheats that save 2 picoseconds.
There are 14 cheats that save 4 picoseconds.
There are 2 cheats that save 6 picoseconds.
There are 4 cheats that save 8 picoseconds.
There are 2 cheats that save 10 picoseconds.
There are 3 cheats that save 12 picoseconds.
There is one cheat that saves 20 picoseconds.
There is one cheat that saves 36 picoseconds.
There is one cheat that saves 38 picoseconds.
There is one cheat that saves 40 picoseconds.
There is one cheat that saves 64 picoseconds.
You aren't sure what the conditions of the racetrack will be like, so to give yourself as many options as possible, you'll need a list of the best cheats. How many cheats would save you at least 100 picoseconds?
Your puzzle answer was 1393.
--- Part Two ---
The programs seem perplexed by your list of cheats. Apparently, the two-picosecond cheating rule was deprecated several milliseconds ago! The latest version of the cheating rule permits a single cheat that instead lasts at most 20 picoseconds.
Now, in addition to all the cheats that were possible in just two picoseconds, many more cheats are possible. This six-picosecond cheat saves 76 picoseconds:
###############
#...#...#.....#
#.#.#.#.#.###.#
#S#...#.#.#...#
#1#####.#.#.###
#2#####.#.#...#
#3#####.#.###.#
#456.E#...#...#
###.#######.###
#...###...#...#
#.#####.#.###.#
#.#...#.#.#...#
#.#.#.#.#.#.###
#...#...#...###
###############
Because this cheat has the same start and end positions as the one above, it's the same cheat, even though the path taken during the cheat is different:
###############
#...#...#.....#
#.#.#.#.#.###.#
#S12..#.#.#...#
###3###.#.#.###
###4###.#.#...#
###5###.#.###.#
###6.E#...#...#
###.#######.###
#...###...#...#
#.#####.#.###.#
#.#...#.#.#...#
#.#.#.#.#.#.###
#...#...#...###
###############
Cheats don't need to use all 20 picoseconds; cheats can last any amount of time up to and including 20 picoseconds (but can still only end when the program is on normal track). Any cheat time not used is lost; it can't be saved for another cheat later.
You'll still need a list of the best cheats, but now there are even more to choose between. Here are the quantities of cheats in this example that save 50 picoseconds or more:
There are 32 cheats that save 50 picoseconds.
There are 31 cheats that save 52 picoseconds.
There are 29 cheats that save 54 picoseconds.
There are 39 cheats that save 56 picoseconds.
There are 25 cheats that save 58 picoseconds.
There are 23 cheats that save 60 picoseconds.
There are 20 cheats that save 62 picoseconds.
There are 19 cheats that save 64 picoseconds.
There are 12 cheats that save 66 picoseconds.
There are 14 cheats that save 68 picoseconds.
There are 12 cheats that save 70 picoseconds.
There are 22 cheats that save 72 picoseconds.
There are 4 cheats that save 74 picoseconds.
There are 3 cheats that save 76 picoseconds.
Find the best cheats using the updated cheating rules. How many cheats would save you at least 100 picoseconds?
Your puzzle answer was 990096.
Both parts of this puzzle are complete! They provide two gold stars: **
+60
View File
@@ -0,0 +1,60 @@
#!/usr/bin/env python3
import sys
from copy import deepcopy
def find_track(track, p, c):
path = deepcopy(track)
directions = [[0,1], [1,0], [0,-1], [-1,0]]
curx, cury = p['s']
p[0] = p['s']
for i in range(sum([t.count('.') for t in track])+1):
for d in directions:
nx, ny = curx + d[0], cury + d[1]
if 0 <= nx < len(track[0]) and 0 <= ny < len(track):
if path[ny][nx] == '.' or path[ny][nx] == 'E':
path[ny][nx] = str(i+1)
p[i+1] = (nx, ny)
curx, cury = nx, ny
break
for i in range(sum([t.count('.') for t in track])+1):
curx, cury = p[i]
for d in directions:
nx, ny = curx + d[0], cury + d[1]
if 0 <= nx < len(track[0]) and 0 <= ny < len(track) and track[ny][nx] == '#':
for d1 in directions:
tx, ty = nx + d1[0], ny + d1[1]
if 0 <= tx < len(track[0]) and 0 <= ty < len(track) and track[ty][tx] in ['.', 'E'] and int(path[ty][tx]) > i:
c[(i,path[ty][tx])] = int(path[ty][tx]) - i - 2
return path
if __name__ == '__main__':
track = [list(line.strip('\n')) for line in open(sys.argv[1])]
positions = {}
cheats ={}
for j,t in enumerate(track):
if 'S' in t: positions['s'] = (t.index('S'),j)
if 'E' in t: positions['e'] = (t.index('E'),j)
path = find_track(track, positions, cheats)
# challenge 1
res1 = 0
for v in sorted(set(cheats.values())):
if v >= 100:
res1 += [x for x in cheats.values()].count(v)
print(f"challenge 1:\n{res1}\n")
# challenge 2 (replace 100 by 50 for example)
res2 = 0
for i in range(sum([t.count('.') for t in track])+2):
x, y = positions[i]
for j in range(i+100, sum([t.count('.') for t in track])+2):
x1, y1 = positions[j]
dist = abs(y1-y) + abs(x1-x)
if dist <= 20 and j-i-dist>=100:
res2 += 1
print(f"challenge 2:\n{res2}")
+15
View File
@@ -0,0 +1,15 @@
###############
#...#...#.....#
#.#.#.#.#.###.#
#S#...#.#.#...#
#######.#.#.###
#######.#.#...#
#######.#.###.#
###..E#...#...#
###.#######.###
#...###...#...#
#.#####.#.###.#
#.#...#.#.#...#
#.#.#.#.#.#.###
#...#...#...###
###############
+141
View File
@@ -0,0 +1,141 @@
#############################################################################################################################################
#...#...#...#...#.........#.........###...#.....#...#.....#...#.......#...#...###...#...#...###.......#.........#...#...#...#...............#
#.#.#.#.#.#.#.#.#.#######.#.#######.###.#.#.###.#.#.#.###.#.#.#.#####.#.#.#.#.###.#.#.#.#.#.###.#####.#.#######.#.#.#.#.#.#.#.#############.#
#.#.#.#.#.#...#.#.....#...#.#.......#...#.#...#.#.#.#...#...#.#.#.....#.#.#.#.#...#...#.#.#...#...#...#.....#...#.#.#.#...#...#.........#...#
#.#.#.#.#.#####.#####.#.###.#.#######.###.###.#.#.#.###.#####.#.#.#####.#.#.#.#.#######.#.###.###.#.#######.#.###.#.#.#########.#######.#.###
#.#.#.#.#...#...#...#.#...#.#.#.....#...#...#.#.#.#...#.#.....#.#.###...#.#.#.#.......#.#.#...#...#.....###.#.....#...#...#...#.......#...###
#.#.#.#.###.#.###.#.#.###.#.#.#.###.###.###.#.#.#.###.#.#.#####.#.###.###.#.#.#######.#.#.#.###.#######.###.###########.#.#.#.#######.#######
#.#.#.#.#...#...#.#.#.#...#.#.#.#...###...#.#.#.#.#...#.#...#...#...#...#...#.....###.#.#.#...#.....#...#...#.......#...#...#...#.....#.....#
#.#.#.#.#.#####.#.#.#.#.###.#.#.#.#######.#.#.#.#.#.###.###.#.#####.###.#########.###.#.#.###.#####.#.###.###.#####.#.#########.#.#####.###.#
#.#.#.#.#.....#.#.#...#.#...#...#.....#...#...#.#.#...#.#...#.....#...#...#.......#...#...#...#.....#...#...#.....#.#.........#...#.....#...#
#.#.#.#.#####.#.#.#####.#.###########.#.#######.#.###.#.#.#######.###.###.#.#######.#######.###.#######.###.#####.#.#########.#####.#####.###
#.#...#.....#.#.#.#.....#...#.....#...#...#.....#...#.#.#...#...#...#.#...#.......#.......#...#.......#.....#.....#...........#...#.....#...#
#.#########.#.#.#.#.#######.#.###.#.#####.#.#######.#.#.###.#.#.###.#.#.#########.#######.###.#######.#######.#################.#.#####.###.#
#.#...#...#...#...#...#####.#...#...#####.#.###...#.#.#.#...#.#.....#...#...#.....###...#.#...#...###...#...#.#...#...#.....###.#.###...#...#
#.#.#.#.#.###########.#####.###.#########.#.###.#.#.#.#.#.###.###########.#.#.#######.#.#.#.###.#.#####.#.#.#.#.#.#.#.#.###.###.#.###.###.###
#...#...#...#.......#...#...#...#...###...#...#.#.#.#.#.#.###.......#.....#...#...#...#.#.#.###.#.#...#.#.#.#...#...#...#...#...#...#...#...#
###########.#.#####.###.#.###.###.#.###.#####.#.#.#.#.#.#.#########.#.#########.#.#.###.#.#.###.#.#.#.#.#.#.#############.###.#####.###.###.#
#...###...#...#...#...#...#...#...#.#...#...#.#.#.#.#...#...###...#.#.....#.....#.#...#...#.#...#.#.#.#.#.#...#...........#...#.....#...#...#
#.#.###.#.#####.#.###.#####.###.###.#.###.#.#.#.#.#.#######.###.#.#.#####.#.#####.###.#####.#.###.#.#.#.#.###.#.###########.###.#####.###.###
#.#.#...#.....#.#...#.....#...#.#...#...#.#...#.#...#.......#...#.#.#.....#.....#.###.....#.#...#.#.#.#...#...#...........#...#.....#.#...###
#.#.#.#######.#.###.#####.###.#.#.#####.#.#####.#####.#######.###.#.#.#########.#.#######.#.###.#.#.#.#####.#############.###.#####.#.#.#####
#.#...#.....#.#.#...#...#...#...#.#...#.#...#...#.....#.....#...#.#.#.......#...#...#...#.#.....#.#.#.#.....#.............#...#.....#.#.#...#
#.#####.###.#.#.#.###.#.###.#####.#.#.#.###.#.###.#####.###.###.#.#.#######.#.#####.#.#.#.#######.#.#.#.#####.#############.###.#####.#.#.#.#
#.#...#.#...#...#.....#.....#.....#.#.#.#...#...#.#...#...#.....#.#.#.....#.#.....#...#.#...#.....#.#.#.....#.#...###...###.#...#...#.#.#.#.#
#.#.#.#.#.###################.#####.#.#.#.#####.#.#.#.###.#######.#.#.###.#.#####.#####.###.#.#####.#.#####.#.#.#.###.#.###.#.###.#.#.#.#.#.#
#.#.#...#.................#...#...#.#.#.#.#.....#.#.#.###.......#.#.#...#...#...#...#...#...#.#.....#.#...#.#.#.#.....#.....#.....#...#...#.#
#.#.#####################.#.###.#.#.#.#.#.#.#####.#.#.#########.#.#.###.#####.#.###.#.###.###.#.#####.#.#.#.#.#.###########################.#
#.#.....#.................#.###.#.#.#.#.#.#...#...#.#...#...#...#.#.#...#...#.#.#...#...#...#.#...#...#.#.#.#.#.#.....#.......#.....#...#...#
#.#####.#.#################.###.#.#.#.#.#.###.#.###.###.#.#.#.###.#.#.###.#.#.#.#.#####.###.#.###.#.###.#.#.#.#.#.###.#.#####.#.###.#.#.#.###
#.#.....#.................#.....#.#.#.#.#...#.#...#...#.#.#.#...#.#.#.###.#.#.#.#...#...#...#...#.#.....#.#.#...#...#.#.....#...#...#.#.#...#
#.#.#####################.#######.#.#.#.###.#.###.###.#.#.#.###.#.#.#.###.#.#.#.###.#.###.#####.#.#######.#.#######.#.#####.#####.###.#.###.#
#...###.......#...#.....#.......#...#.#.#...#...#...#.#...#.#...#.#.#.#...#.#.#...#.#.#...#.....#...#...#.#.#.......#.#...#.....#.....#.....#
#######.#####.#.#.#.###.#######.#####.#.#.#####.###.#.#####.#.###.#.#.#.###.#.###.#.#.#.###.#######.#.#.#.#.#.#######.#.#.#####.#############
#.....#.....#...#.#...#.......#.....#.#.#.#...#...#.#...#...#...#.#.#.#.#...#...#.#.#.#.#...###...#...#.#...#.....###...#.......#...........#
#.###.#####.#####.###.#######.#####.#.#.#.#.#.###.#.###.#.#####.#.#.#.#.#.#####.#.#.#.#.#.#####.#.#####.#########.###############.#########.#
#.#...#...#.....#.....#.....#...###.#.#.#.#.#...#.#...#.#.....#.#...#.#.#...#...#.#.#.#.#...#...#...#...#.......#...###...#...###.#.....#...#
#.#.###.#.#####.#######.###.###.###.#.#.#.#.###.#.###.#.#####.#.#####.#.###.#.###.#.#.#.###.#.#####.#.###.#####.###.###.#.#.#.###.#.###.#.###
#.#.#...#.......#.....#.###...#...#.#.#.#...###...###.#...#...#.###...#...#.#.#...#.#.#...#.#.....#...###.....#...#...#.#...#.....#...#.#...#
#.#.#.###########.###.#.#####.###.#.#.#.#############.###.#.###.###.#####.#.#.#.###.#.###.#.#####.###########.###.###.#.#############.#.###.#
#.#.#.....#.....#.#...#.#...#...#...#.#.............#...#.#...#...#...#...#.#.#...#.#...#.#.#.....###.........###...#...#...#...#...#.#...#.#
#.#.#####.#.###.#.#.###.#.#.###.#####.#############.###.#.###.###.###.#.###.#.###.#.###.#.#.#.#######.#############.#####.#.#.#.#.#.#.###.#.#
#.#.......#.###.#.#.#...#.#.....#...#...#...#.....#.#...#.#...#...#...#.#...#.###.#...#.#.#.#.#.......#...........#.#...#.#...#...#.#...#...#
#.#########.###.#.#.#.###.#######.#.###.#.#.#.###.#.#.###.#.###.###.###.#.###.###.###.#.#.#.#.#.#######.#########.#.#.#.#.#########.###.#####
#.........#...#.#.#.#.###...#...#.#...#...#.#...#...#...#.#...#...#.#...#...#.#...#...#.#.#.#.#.#.......#.........#...#.#...#...###.....#...#
#########.###.#.#.#.#.#####.#.#.#.###.#####.###.#######.#.###.###.#.#.#####.#.#.###.###.#.#.#.#.#.#######.#############.###.#.#.#########.#.#
#.........#...#.#.#...#...#...#...#...#...#...#...#.....#.###.#...#.#.###...#.#.#...###.#.#.#.#...###...#...#...#...###...#...#.#...###...#.#
#.#########.###.#.#####.#.#########.###.#.###.###.#.#####.###.#.###.#.###.###.#.#.#####.#.#.#.#######.#.###.#.#.#.#.#####.#####.#.#.###.###.#
#...#.....#...#...#.....#.....###...###.#...#.#...#...#...#...#.#...#...#...#.#...#...#.#.#...#.......#.....#.#...#.....#.#...#.#.#...#.#...#
###.#.###.###.#####.#########.###.#####.###.#.#.#####.#.###.###.#.#####.###.#.#####.#.#.#.#####.#############.#########.#.#.#.#.#.###.#.#.###
#...#...#...#.....#.....#...#...#.......#...#...#...#.#.#...#...#...#...#...#.....#.#...#.#...#...#...#...###.#.....#...#.#.#...#.#...#.#.###
#.#####.###.#####.#####.#.#.###.#########.#######.#.#.#.#.###.#####.#.###.#######.#.#####.#.#.###.#.#.#.#.###.#.###.#.###.#.#####.#.###.#.###
#.......###.......#...#...#...#...........#...#...#.#.#.#...#.....#.#.#...#...#...#.#...#.#.#.....#.#.#.#.....#...#.#...#.#.......#.#...#...#
###################.#.#######.#############.#.#.###.#.#.###.#####.#.#.#.###.#.#.###.#.#.#.#.#######.#.#.#########.#.###.#.#########.#.#####.#
#...###...#...#...#.#.###...#.......#...###.#...#S..#...#...#...#.#.#.#...#.#.#.###...#.#.#.....#...#...#...#.....#.#...#.........#...#.....#
#.#.###.#.#.#.#.#.#.#.###.#.#######.#.#.###.#############.###.#.#.#.#.###.#.#.#.#######.#.#####.#.#######.#.#.#####.#.###########.#####.#####
#.#.....#...#...#...#.....#.........#.#.....#############...#.#.#.#.#.#...#.#.#.#.....#...#...#...###.....#...#...#.#...........#...#...#...#
#.###################################.#####################.#.#.#.#.#.#.###.#.#.#.###.#####.#.#######.#########.#.#.###########.###.#.###.#.#
#.#.....#...#.......#.................#####################...#.#.#.#.#.#...#...#...#.#.....#...#.....#...#...#.#.#.............#...#.....#.#
#.#.###.#.#.#.#####.#.#########################################.#.#.#.#.#.#########.#.#.#######.#.#####.#.#.#.#.#.###############.#########.#
#.#...#.#.#.#.#.....#.#....E###################################...#.#.#...#...#.....#...#.....#.#.......#...#...#...#...#.......#.#...#.....#
#.###.#.#.#.#.#.#####.#.###########################################.#.#####.#.#.#########.###.#.###################.#.#.#.#####.#.#.#.#.#####
#...#.#...#.#.#.......#.......###################################...#.#.....#...#...#.....#...#...#.................#.#...#...#.#.#.#.#.....#
###.#.#####.#.###############.###################################.###.#.#########.#.#.#####.#####.#.#################.#####.#.#.#.#.#.#####.#
###...#...#.#.#...............###################################.....#.#...#.....#...#...#.....#.#.................#...#...#...#...#...#...#
#######.#.#.#.#.#######################################################.#.#.#.#########.#.#####.#.#################.###.#.#############.#.###
###...#.#.#...#...#...#.......#####################################...#...#.#.#.........#.......#.###...............#...#.......#...###...###
###.#.#.#.#######.#.#.#.#####.#####################################.#.#####.#.#.#################.###.###############.#########.#.#.#########
#...#...#.........#.#.#.#.....#.....#############...#...........#...#.###...#.#.........#...#...#...#.........#.......#...#.....#.#.#...#...#
#.#################.#.#.#.#####.###.#############.#.#.#########.#.###.###.###.#########.#.#.#.#.###.#########.#.#######.#.#.#####.#.#.#.#.#.#
#.#...#.........#...#...#.....#.###.....#...#.....#...#.........#...#...#.....#.........#.#.#.#...#...........#.#.......#...#...#.#.#.#.#.#.#
#.#.#.#.#######.#.###########.#.#######.#.#.#.#########.###########.###.#######.#########.#.#.###.#############.#.###########.#.#.#.#.#.#.#.#
#...#...#.......#.#...#...###...#.......#.#.#.#.........#...#...###.#...#...#...#.....#...#.#...#...............#...#...#.....#.#.#.#.#.#.#.#
#########.#######.#.#.#.#.#######.#######.#.#.#.#########.#.#.#.###.#.###.#.#.###.###.#.###.###.###################.#.#.#.#####.#.#.#.#.#.#.#
#.......#.......#.#.#...#.......#.........#...#...........#...#.#...#.#...#.#.....###.#...#.....#...............#...#.#...#.....#.#.#.#...#.#
#.#####.#######.#.#.###########.###############################.#.###.#.###.#########.###.#######.#############.#.###.#####.#####.#.#.#####.#
#.#...#.......#...#...........#.#.........#...#...#.......#.....#...#...#...#...###...#...###.....#...#.......#...#...#...#.#.....#...#...#.#
#.#.#.#######.###############.#.#.#######.#.#.#.#.#.#####.#.#######.#####.###.#.###.###.#####.#####.#.#.#####.#####.###.#.#.#.#########.#.#.#
#...#.......#.###.............#.#.......#...#...#.#...###.#...#...#.....#...#.#...#...#.....#.#...#.#...#.....#...#.#...#...#.....#.....#...#
###########.#.###.#############.#######.#########.###.###.###.#.#.#####.###.#.###.###.#####.#.#.#.#.#####.#####.#.#.#.###########.#.#########
#...........#...#...#.....#...#.......#.........#...#...#.....#.#.......#...#...#.###.#...#.#...#...#.....#...#.#.#.#.#...###...#.#.....#...#
#.#############.###.#.###.#.#.#######.#########.###.###.#######.#########.#####.#.###.#.#.#.#########.#####.#.#.#.#.#.#.#.###.#.#.#####.#.#.#
#.............#.###...#...#.#.......#...........###.#...#.....#.......#...#.....#...#...#...#...###...#...#.#.#.#...#...#.....#...#...#...#.#
#############.#.#######.###.#######.###############.#.###.###.#######.#.###.#######.#########.#.###.###.#.#.#.#.###################.#.#####.#
#.............#.#.......#...###...#.#...#...###...#.#.###.#...###...#.#.###...#.....#...#...#.#...#.....#...#...#...........#...#...#.......#
#.#############.#.#######.#####.#.#.#.#.#.#.###.#.#.#.###.#.#####.#.#.#.#####.#.#####.#.#.#.#.###.###############.#########.#.#.#.###########
#.........#...#.#.........#...#.#.#...#...#...#.#.#...#...#...#...#.#.#...#...#...#...#.#.#.#...#.#...###...#...#.........#...#...#####.....#
#########.#.#.#.###########.#.#.#.###########.#.#.#####.#####.#.###.#.###.#.#####.#.###.#.#.###.#.#.#.###.#.#.#.#########.#############.###.#
#.......#...#.#.###.........#...#.....#...#...#.#...###...#...#...#.#...#.#...#...#...#.#.#.#...#...#.....#...#.#...#...#...........#...#...#
#.#####.#####.#.###.#################.#.#.#.###.###.#####.#.#####.#.###.#.###.#.#####.#.#.#.#.#################.#.#.#.#.###########.#.###.###
#.....#.#.....#...#.................#.#.#.#...#.#...#...#.#.#...#.#.#...#.#...#...#...#...#.#.........#...#...#...#...#.............#...#...#
#####.#.#.#######.#################.#.#.#.###.#.#.###.#.#.#.#.#.#.#.#.###.#.#####.#.#######.#########.#.#.#.#.#########################.###.#
#...#.#.#.......#...###.............#...#.#...#.#.###.#.#.#.#.#.#.#.#...#.#.#...#.#.......#.###...###...#...#.........###.....#...#...#.#...#
#.#.#.#.#######.###.###.#################.#.###.#.###.#.#.#.#.#.#.#.###.#.#.#.#.#.#######.#.###.#.###################.###.###.#.#.#.#.#.#.###
#.#.#.#.#.....#...#.....#.....#.....#...#...#...#...#.#.#.#.#.#...#...#.#.#.#.#...#...#...#.#...#...................#.....#...#.#.#.#.#.#...#
#.#.#.#.#.###.###.#######.###.#.###.#.#.#####.#####.#.#.#.#.#.#######.#.#.#.#.#####.#.#.###.#.#####################.#######.###.#.#.#.#.###.#
#.#...#.#...#.###.......#...#...###...#.#...#.....#.#.#.#.#.#.....#...#.#...#.#...#.#.#...#.#...............#...###.......#.....#...#...#...#
#.#####.###.#.#########.###.###########.#.#.#####.#.#.#.#.#.#####.#.###.#####.#.#.#.#.###.#.###############.#.#.#########.###############.###
#.#...#.....#...........#...#...........#.#.###...#.#.#.#.#...#...#...#.#...#...#.#.#...#.#...#...###...#...#.#.#.......#.#...#...#...#...###
#.#.#.###################.###.###########.#.###.###.#.#.#.###.#.#####.#.#.#.#####.#.###.#.###.#.#.###.#.#.###.#.#.#####.#.#.#.#.#.#.#.#.#####
#.#.#.......#.......#...#...#...#...#...#.#...#...#...#...#...#...#...#...#.#.....#.#...#...#...#.#...#...###.#.#.#.....#...#.#.#.#.#.#.....#
#.#.#######.#.#####.#.#.###.###.#.#.#.#.#.###.###.#########.#####.#.#######.#.#####.#.#####.#####.#.#########.#.#.#.#########.#.#.#.#.#####.#
#...#.......#.#.....#.#.....###...#...#.#.#...###.#...#...#.#.....#.#...#...#.#...#.#...###...#...#...........#...#.........#.#.#.#.#.......#
#####.#######.#.#####.#################.#.#.#####.#.#.#.#.#.#.#####.#.#.#.###.#.#.#.###.#####.#.###########################.#.#.#.#.#########
#...#...#...#.#.#...#.#.....#...#.......#.#.#...#...#...#.#.#.....#.#.#.#...#.#.#.#.#...#...#.#.#...#...#.......#...........#...#.#.....#...#
#.#.###.#.#.#.#.#.#.#.#.###.#.#.#.#######.#.#.#.#########.#.#####.#.#.#.###.#.#.#.#.#.###.#.#.#.#.#.#.#.#.#####.#.###############.#####.#.#.#
#.#.....#.#.#.#.#.#...#...#...#...#...#...#...#...#...#...#...#...#...#...#.#.#.#.#.#.#...#.#.#...#.#.#.#...#...#...............#.#...#...#.#
#.#######.#.#.#.#.#######.#########.#.#.#########.#.#.#.#####.#.#########.#.#.#.#.#.#.#.###.#.#####.#.#.###.#.#################.#.#.#.#####.#
#...#...#.#...#.#.#.......#.......#.#...#.........#.#.#...#...#.###.......#.#.#.#.#.#.#.#...#...#...#.#...#.#...#...............#.#.#.#...#.#
###.#.#.#.#####.#.#.#######.#####.#.#####.#########.#.###.#.###.###.#######.#.#.#.#.#.#.#.#####.#.###.###.#.###.#.###############.#.#.#.#.#.#
#...#.#.#.#.....#.#.#.....#.#.....#...###.#...#...#.#.#...#...#...#.....#...#.#.#.#.#...#.#.....#...#...#...###.#.....#...###...#...#...#.#.#
#.###.#.#.#.#####.#.#.###.#.#.#######.###.#.#.#.#.#.#.#.#####.###.#####.#.###.#.#.#.#####.#.#######.###.#######.#####.#.#.###.#.#########.#.#
#.#...#.#.#.....#.#.#...#.#.#...#...#...#.#.#.#.#.#.#.#.#.....#...#.....#...#...#...#...#.#.#.....#...#.......#.#...#...#.....#.........#...#
#.#.###.#.#####.#.#.###.#.#.###.#.#.###.#.#.#.#.#.#.#.#.#.#####.###.#######.#########.#.#.#.#.###.###.#######.#.#.#.###################.#####
#.#...#.#.#.....#.#...#.#.#.#...#.#.#...#...#.#.#.#.#.#.#...#...#...#...#...#.........#...#...#...#...#.....#.#.#.#.#...#...#...#.....#.....#
#.###.#.#.#.#####.###.#.#.#.#.###.#.#.#######.#.#.#.#.#.###.#.###.###.#.#.###.#################.###.###.###.#.#.#.#.#.#.#.#.#.#.#.###.#####.#
#.#...#...#.#...#.###.#.#...#.....#.#.....#...#.#...#.#...#.#...#.#...#.#.###...#...#...#...#...#...#...###.#.#...#.#.#...#.#.#.#...#.......#
#.#.#######.#.#.#.###.#.###########.#####.#.###.#####.###.#.###.#.#.###.#.#####.#.#.#.#.#.#.#.###.###.#####.#.#####.#.#####.#.#.###.#########
#.#.###.....#.#.#.#...#.#...........#.....#...#.#.....#...#...#.#...#...#.#.....#.#.#.#.#.#.#.###.#...#.....#.#.....#.....#...#...#...#.....#
#.#.###.#####.#.#.#.###.#.###########.#######.#.#.#####.#####.#.#####.###.#.#####.#.#.#.#.#.#.###.#.###.#####.#.#########.#######.###.#.###.#
#...#...#...#.#...#...#.#.....#.....#.......#.#.#.....#...#...#.....#...#.#.#.....#...#.#.#.#...#.#.#...#...#.#.#...#.....###...#.#...#.#...#
#####.###.#.#.#######.#.#####.#.###.#######.#.#.#####.###.#.#######.###.#.#.#.#########.#.#.###.#.#.#.###.#.#.#.#.#.#.#######.#.#.#.###.#.###
#.....#...#.#.#.......#.###...#.#...#...#...#.#.#.....#...#.#...#...###...#.#.#.........#.#.#...#...#.#...#.#.#.#.#.#.......#.#.#...#...#...#
#.#####.###.#.#.#######.###.###.#.###.#.#.###.#.#.#####.###.#.#.#.#########.#.#.#########.#.#.#######.#.###.#.#.#.#.#######.#.#.#####.#####.#
#...#...#...#.#.........#...#...#...#.#.#.###.#.#.#...#.###...#.#.###.....#.#.#...#...#...#.#.#.....#...#...#.#.#.#...#.....#.#.......#...#.#
###.#.###.###.###########.###.#####.#.#.#.###.#.#.#.#.#.#######.#.###.###.#.#.###.#.#.#.###.#.#.###.#####.###.#.#.###.#.#####.#########.#.#.#
###...###.....#.....#...#...#...###.#.#...#...#.#.#.#.#.......#.#.....#...#...###...#.#.#...#...#...#.....#...#.#.###.#.....#.#...#...#.#.#.#
###############.###.#.#.###.###.###.#.#####.###.#.#.#.#######.#.#######.#############.#.#.#######.###.#####.###.#.###.#####.#.#.#.#.#.#.#.#.#
#.......###...#...#...#.....#...#...#...###...#.#.#.#.#.......#...#...#.......#.......#.#...#...#...#...#...#...#.#...#...#...#.#...#...#...#
#.#####.###.#.###.###########.###.#####.#####.#.#.#.#.#.#########.#.#.#######.#.#######.###.#.#.###.###.#.###.###.#.###.#.#####.#############
#.....#.#...#.#...#...#...#...###.....#.#.....#.#.#.#.#.........#.#.#.#...#...#...#...#...#.#.#...#...#.#...#.#...#.#...#.#...#.............#
#####.#.#.###.#.###.#.#.#.#.#########.#.#.#####.#.#.#.#########.#.#.#.#.#.#.#####.#.#.###.#.#.###.###.#.###.#.#.###.#.###.#.#.#############.#
#...#.#.#.#...#.#...#.#.#.#.....#.....#.#...#...#...#...#...#...#.#.#.#.#.#...###...#.#...#...#...#...#.#...#.#.#...#...#.#.#.#.........#...#
#.#.#.#.#.#.###.#.###.#.#.#####.#.#####.###.#.#########.#.#.#.###.#.#.#.#.###.#######.#.#######.###.###.#.###.#.#.#####.#.#.#.#.#######.#.###
#.#...#.#.#.....#...#.#.#.#.....#.....#.#...#.#...#.....#.#...###.#.#.#.#.#...#.......#.......#.#...###.#.#...#.#...#...#.#.#.#.......#...###
#.#####.#.#########.#.#.#.#.#########.#.#.###.#.#.#.#####.#######.#.#.#.#.#.###.#############.#.#.#####.#.#.###.###.#.###.#.#.#######.#######
#.....#...#.....#...#.#.#.#.#.........#.#...#...#.#.....#.......#...#.#.#.#...#.#.......#...#.#.#.....#...#.#...###...#...#.#.#.....#.......#
#####.#####.###.#.###.#.#.#.#.#########.###.#####.#####.#######.#####.#.#.###.#.#.#####.#.#.#.#.#####.#####.#.#########.###.#.#.###.#######.#
#.....#...#.#...#...#.#.#.#.#...#...#...#...#...#.....#...#...#.#.....#.#.#...#.#.#.....#.#.#.#.#...#...#...#.....#.....#...#.#...#...#...#.#
#.#####.#.#.#.#####.#.#.#.#.###.#.#.#.###.###.#.#####.###.#.#.#.#.#####.#.#.###.#.#.#####.#.#.#.#.#.###.#.#######.#.#####.###.###.###.#.#.#.#
#.......#...#.......#...#...###...#...###.....#.......###...#...#.......#...###...#.......#...#...#.....#.........#.......###.....###...#...#
#############################################################################################################################################
+118
View File
@@ -0,0 +1,118 @@
--- Day 21: Keypad Conundrum ---
As you teleport onto Santa's Reindeer-class starship, The Historians begin to panic: someone from their search party is missing. A quick life-form scan by the ship's computer reveals that when the missing Historian teleported, he arrived in another part of the ship.
The door to that area is locked, but the computer can't open it; it can only be opened by physically typing the door codes (your puzzle input) on the numeric keypad on the door.
The numeric keypad has four rows of buttons: 789, 456, 123, and finally an empty gap followed by 0A. Visually, they are arranged like this:
+---+---+---+
| 7 | 8 | 9 |
+---+---+---+
| 4 | 5 | 6 |
+---+---+---+
| 1 | 2 | 3 |
+---+---+---+
| 0 | A |
+---+---+
Unfortunately, the area outside the door is currently depressurized and nobody can go near the door. A robot needs to be sent instead.
The robot has no problem navigating the ship and finding the numeric keypad, but it's not designed for button pushing: it can't be told to push a specific button directly. Instead, it has a robotic arm that can be controlled remotely via a directional keypad.
The directional keypad has two rows of buttons: a gap / ^ (up) / A (activate) on the first row and < (left) / v (down) / > (right) on the second row. Visually, they are arranged like this:
+---+---+
| ^ | A |
+---+---+---+
| < | v | > |
+---+---+---+
When the robot arrives at the numeric keypad, its robotic arm is pointed at the A button in the bottom right corner. After that, this directional keypad remote control must be used to maneuver the robotic arm: the up / down / left / right buttons cause it to move its arm one button in that direction, and the A button causes the robot to briefly move forward, pressing the button being aimed at by the robotic arm.
For example, to make the robot type 029A on the numeric keypad, one sequence of inputs on the directional keypad you could use is:
< to move the arm from A (its initial position) to 0.
A to push the 0 button.
^A to move the arm to the 2 button and push it.
>^^A to move the arm to the 9 button and push it.
vvvA to move the arm to the A button and push it.
In total, there are three shortest possible sequences of button presses on this directional keypad that would cause the robot to type 029A: <A^A>^^AvvvA, <A^A^>^AvvvA, and <A^A^^>AvvvA.
Unfortunately, the area containing this directional keypad remote control is currently experiencing high levels of radiation and nobody can go near it. A robot needs to be sent instead.
When the robot arrives at the directional keypad, its robot arm is pointed at the A button in the upper right corner. After that, a second, different directional keypad remote control is used to control this robot (in the same way as the first robot, except that this one is typing on a directional keypad instead of a numeric keypad).
There are multiple shortest possible sequences of directional keypad button presses that would cause this robot to tell the first robot to type 029A on the door. One such sequence is v<<A>>^A<A>AvA<^AA>A<vAAA>^A.
Unfortunately, the area containing this second directional keypad remote control is currently -40 degrees! Another robot will need to be sent to type on that directional keypad, too.
There are many shortest possible sequences of directional keypad button presses that would cause this robot to tell the second robot to tell the first robot to eventually type 029A on the door. One such sequence is <vA<AA>>^AvAA<^A>A<v<A>>^AvA^A<vA>^A<v<A>^A>AAvA^A<v<A>A>^AAAvA<^A>A.
Unfortunately, the area containing this third directional keypad remote control is currently full of Historians, so no robots can find a clear path there. Instead, you will have to type this sequence yourself.
Were you to choose this sequence of button presses, here are all of the buttons that would be pressed on your directional keypad, the two robots' directional keypads, and the numeric keypad:
<vA<AA>>^AvAA<^A>A<v<A>>^AvA^A<vA>^A<v<A>^A>AAvA^A<v<A>A>^AAAvA<^A>A
v<<A>>^A<A>AvA<^AA>A<vAAA>^A
<A^A>^^AvvvA
029A
In summary, there are the following keypads:
One directional keypad that you are using.
Two directional keypads that robots are using.
One numeric keypad (on a door) that a robot is using.
It is important to remember that these robots are not designed for button pushing. In particular, if a robot arm is ever aimed at a gap where no button is present on the keypad, even for an instant, the robot will panic unrecoverably. So, don't do that. All robots will initially aim at the keypad's A key, wherever it is.
To unlock the door, five codes will need to be typed on its numeric keypad. For example:
029A
980A
179A
456A
379A
For each of these, here is a shortest sequence of button presses you could type to cause the desired code to be typed on the numeric keypad:
029A: <vA<AA>>^AvAA<^A>A<v<A>>^AvA^A<vA>^A<v<A>^A>AAvA^A<v<A>A>^AAAvA<^A>A
980A: <v<A>>^AAAvA^A<vA<AA>>^AvAA<^A>A<v<A>A>^AAAvA<^A>A<vA>^A<A>A
179A: <v<A>>^A<vA<A>>^AAvAA<^A>A<v<A>>^AAvA^A<vA>^AA<A>A<v<A>A>^AAAvA<^A>A
456A: <v<A>>^AA<vA<A>>^AAvAA<^A>A<vA>^A<A>A<vA>^A<A>A<v<A>A>^AAvA<^A>A
379A: <v<A>>^AvA^A<vA<AA>>^AAvA<^A>AAvA^A<vA>^AA<A>A<v<A>A>^AAAvA<^A>A
The Historians are getting nervous; the ship computer doesn't remember whether the missing Historian is trapped in the area containing a giant electromagnet or molten lava. You'll need to make sure that for each of the five codes, you find the shortest sequence of button presses necessary.
The complexity of a single code (like 029A) is equal to the result of multiplying these two values:
The length of the shortest sequence of button presses you need to type on your directional keypad in order to cause the code to be typed on the numeric keypad; for 029A, this would be 68.
The numeric part of the code (ignoring leading zeroes); for 029A, this would be 29.
In the above example, complexity of the five codes can be found by calculating 68 * 29, 60 * 980, 68 * 179, 64 * 456, and 64 * 379. Adding these together produces 126384.
Find the fewest number of button presses you'll need to perform in order to cause the robot in front of the door to type each code. What is the sum of the complexities of the five codes on your list?
Your puzzle answer was 211930.
--- Part Two ---
Just as the missing Historian is released, The Historians realize that a second member of their search party has also been missing this entire time!
A quick life-form scan reveals the Historian is also trapped in a locked area of the ship. Due to a variety of hazards, robots are once again dispatched, forming another chain of remote control keypads managing robotic-arm-wielding robots.
This time, many more robots are involved. In summary, there are the following keypads:
One directional keypad that you are using.
25 directional keypads that robots are using.
One numeric keypad (on a door) that a robot is using.
The keypads form a chain, just like before: your directional keypad controls a robot which is typing on a directional keypad which controls a robot which is typing on a directional keypad... and so on, ending with the robot which is typing on the numeric keypad.
The door codes are the same this time around; only the number of robots and directional keypads has changed.
Find the fewest number of button presses you'll need to perform in order to cause the robot in front of the door to type each code. What is the sum of the complexities of the five codes on your list?
Your puzzle answer was 263492840501566.
Both parts of this puzzle are complete! They provide two gold stars: **
+119
View File
@@ -0,0 +1,119 @@
#!/usr/bin/env python3
import sys, math
from itertools import product
DIR = {
('A', '>'): ['vA'],
('A', '^'): ['<A'],
('A', 'v'): ['v<A', '<vA'],
('A', '<'): ['v<<A'],
('A', 'A'): ['A'],
('^', '^'): ['A'],
('<', '<'): ['A'],
('v', 'v'): ['A'],
('>', '>'): ['A'],
('^', 'A'): ['>A'],
('^', '>'): ['v>A', '>vA'],
('^', 'v'): ['vA'],
('^', '<'): ['v<A'],
('<', 'A'): ['>>^A'],
('<', '^'): ['>^A'],
('<', 'v'): ['>A'],
('<', '>'): ['>>A'],
('v', 'A'): ['>^A', '^>A'],
('v', '^'): ['^A'],
('v', '<'): ['<A'],
('v', '>'): ['>A'],
('>', 'A'): ['^A'],
('>', '<'): ['<<A'],
('>', '^'): ['<^A', '^<A'],
('>', 'v'): ['<A'],
}
NUM = {
'A': (0,2),
'0': (0,1),
'1': (1,0),
'2': (1,1),
'3': (1,2),
'4': (2,0),
'5': (2,1),
'6': (2,2),
'7': (3,0),
'8': (3,1),
'9': (3,2),
}
def memo(f):
memo = {}
def f2(x,y):
if (tuple(x),y) not in memo: memo[(tuple(x),y)] = f(x,y)
return memo[(tuple(x),y)]
return f2
def options(start, end, pad):
s, e = pad[start], pad[end]
d = {'^': (1,0), 'v': (-1,0), '>': (0,1), '<': (0,-1)}
dy = e[0]-s[0]
dx = e[1]-s[1]
opt = ['^'] * dy + ['v'] * -dy + ['<'] * -dx + ['>'] * dx
for o in [tuple(opt), tuple(reversed(opt))]:
s, e = pad[start], pad[end]
gap = False
for step in list(o):
s = s[0] + d[step][0], s[1] + d[step][1]
if s == (0,0): gap = True
if not gap: yield ''.join(o+('A',))
def numeric(code):
strings = ['']
prev = 'A'
for key in list(code):
strings = [s1+s2 for (s1,s2) in product(strings,[opt for opt in options(prev, key, NUM)])]
prev = key
return strings
# reddit solution... (prevKey is 'A' the first time)
def buildSeq(keys, index, prevKey, currPath, result):
if index == len(keys):
result.append(currPath)
return
for path in DIR[(prevKey,keys[index])]:
buildSeq(keys, index+1, keys[index], currPath + path, result)
@memo
def shortestSeq(keys, depth):
if depth == 0: return len(keys)
total = 0
subKeys = keys.split('A')
for subKey in subKeys[:-1]:
seqs = []
buildSeq(subKey+'A', 0, 'A', '', seqs)
minimum = min([shortestSeq(seq, depth-1) for seq in seqs])
total += minimum
return total
if __name__ == '__main__':
codes = [line.strip('\n') for line in open(sys.argv[1])]
res1, res2 = 0, 0
for code in codes:
dirs = set(numeric(code))
l1, l2 = math.inf, math.inf
for d in dirs: l1 = min(shortestSeq(d,2), l1)
res1 += l1 * int(code[:-1])
for d in dirs: l2 = min(shortestSeq(d,25), l2)
res2 += l2 * int(code[:-1])
# challenge 1
print(f"challenge 1:\n{res1}\n")
# challenge 2
print(f"challenge 2:\n{res2}")
+5
View File
@@ -0,0 +1,5 @@
029A
980A
179A
456A
379A
+5
View File
@@ -0,0 +1,5 @@
985A
540A
463A
671A
382A
+126
View File
@@ -0,0 +1,126 @@
--- Day 22: Monkey Market ---
As you're all teleported deep into the jungle, a monkey steals The Historians' device! You'll need to get it back while The Historians are looking for the Chief.
The monkey that stole the device seems willing to trade it, but only in exchange for an absurd number of bananas. Your only option is to buy bananas on the Monkey Exchange Market.
You aren't sure how the Monkey Exchange Market works, but one of The Historians senses trouble and comes over to help. Apparently, they've been studying these monkeys for a while and have deciphered their secrets.
Today, the Market is full of monkeys buying good hiding spots. Fortunately, because of the time you recently spent in this jungle, you know lots of good hiding spots you can sell! If you sell enough hiding spots, you should be able to get enough bananas to buy the device back.
On the Market, the buyers seem to use random prices, but their prices are actually only pseudorandom! If you know the secret of how they pick their prices, you can wait for the perfect time to sell.
The part about secrets is literal, the Historian explains. Each buyer produces a pseudorandom sequence of secret numbers where each secret is derived from the previous.
In particular, each buyer's secret number evolves into the next secret number in the sequence via the following process:
Calculate the result of multiplying the secret number by 64. Then, mix this result into the secret number. Finally, prune the secret number.
Calculate the result of dividing the secret number by 32. Round the result down to the nearest integer. Then, mix this result into the secret number. Finally, prune the secret number.
Calculate the result of multiplying the secret number by 2048. Then, mix this result into the secret number. Finally, prune the secret number.
Each step of the above process involves mixing and pruning:
To mix a value into the secret number, calculate the bitwise XOR of the given value and the secret number. Then, the secret number becomes the result of that operation. (If the secret number is 42 and you were to mix 15 into the secret number, the secret number would become 37.)
To prune the secret number, calculate the value of the secret number modulo 16777216. Then, the secret number becomes the result of that operation. (If the secret number is 100000000 and you were to prune the secret number, the secret number would become 16113920.)
After this process completes, the buyer is left with the next secret number in the sequence. The buyer can repeat this process as many times as necessary to produce more secret numbers.
So, if a buyer had a secret number of 123, that buyer's next ten secret numbers would be:
15887950
16495136
527345
704524
1553684
12683156
11100544
12249484
7753432
5908254
Each buyer uses their own secret number when choosing their price, so it's important to be able to predict the sequence of secret numbers for each buyer. Fortunately, the Historian's research has uncovered the initial secret number of each buyer (your puzzle input). For example:
1
10
100
2024
This list describes the initial secret number of four different secret-hiding-spot-buyers on the Monkey Exchange Market. If you can simulate secret numbers from each buyer, you'll be able to predict all of their future prices.
In a single day, buyers each have time to generate 2000 new secret numbers. In this example, for each buyer, their initial secret number and the 2000th new secret number they would generate are:
1: 8685429
10: 4700978
100: 15273692
2024: 8667524
Adding up the 2000th new secret number for each buyer produces 37327623.
For each buyer, simulate the creation of 2000 new secret numbers. What is the sum of the 2000th secret number generated by each buyer?
Your puzzle answer was 12664695565.
--- Part Two ---
Of course, the secret numbers aren't the prices each buyer is offering! That would be ridiculous. Instead, the prices the buyer offers are just the ones digit of each of their secret numbers.
So, if a buyer starts with a secret number of 123, that buyer's first ten prices would be:
3 (from 123)
0 (from 15887950)
6 (from 16495136)
5 (etc.)
4
4
6
4
4
2
This price is the number of bananas that buyer is offering in exchange for your information about a new hiding spot. However, you still don't speak monkey, so you can't negotiate with the buyers directly. The Historian speaks a little, but not enough to negotiate; instead, he can ask another monkey to negotiate on your behalf.
Unfortunately, the monkey only knows how to decide when to sell by looking at the changes in price. Specifically, the monkey will only look for a specific sequence of four consecutive changes in price, then immediately sell when it sees that sequence.
So, if a buyer starts with a secret number of 123, that buyer's first ten secret numbers, prices, and the associated changes would be:
123: 3
15887950: 0 (-3)
16495136: 6 (6)
527345: 5 (-1)
704524: 4 (-1)
1553684: 4 (0)
12683156: 6 (2)
11100544: 4 (-2)
12249484: 4 (0)
7753432: 2 (-2)
Note that the first price has no associated change because there was no previous price to compare it with.
In this short example, within just these first few prices, the highest price will be 6, so it would be nice to give the monkey instructions that would make it sell at that time. The first 6 occurs after only two changes, so there's no way to instruct the monkey to sell then, but the second 6 occurs after the changes -1,-1,0,2. So, if you gave the monkey that sequence of changes, it would wait until the first time it sees that sequence and then immediately sell your hiding spot information at the current price, winning you 6 bananas.
Each buyer only wants to buy one hiding spot, so after the hiding spot is sold, the monkey will move on to the next buyer. If the monkey never hears that sequence of price changes from a buyer, the monkey will never sell, and will instead just move on to the next buyer.
Worse, you can only give the monkey a single sequence of four price changes to look for. You can't change the sequence between buyers.
You're going to need as many bananas as possible, so you'll need to determine which sequence of four price changes will cause the monkey to get you the most bananas overall. Each buyer is going to generate 2000 secret numbers after their initial secret number, so, for each buyer, you'll have 2000 price changes in which your sequence can occur.
Suppose the initial secret number of each buyer is:
1
2
3
2024
There are many sequences of four price changes you could tell the monkey, but for these four buyers, the sequence that will get you the most bananas is -2,1,-1,3. Using that sequence, the monkey will make the following sales:
For the buyer with an initial secret number of 1, changes -2,1,-1,3 first occur when the price is 7.
For the buyer with initial secret 2, changes -2,1,-1,3 first occur when the price is 7.
For the buyer with initial secret 3, the change sequence -2,1,-1,3 does not occur in the first 2000 changes.
For the buyer starting with 2024, changes -2,1,-1,3 first occur when the price is 9.
So, by asking the monkey to sell the first time each buyer's prices go down 2, then up 1, then down 1, then up 3, you would get 23 (7 + 7 + 9) bananas!
Figure out the best sequence to tell the monkey so that by looking for that same sequence of changes in every buyer's future prices, you get the most bananas in total. What is the most bananas you can get?
Your puzzle answer was 1444.
Both parts of this puzzle are complete! They provide two gold stars: **
+48
View File
@@ -0,0 +1,48 @@
#!/usr/bin/env python3
import sys
def mix_and_prune(secret, result):
return (secret ^ result) % 16777216
def prg(secret):
nsec = mix_and_prune(secret, secret * 64)
nsec = mix_and_prune(nsec, nsec // 32)
return mix_and_prune(nsec, nsec * 2048)
if __name__ == '__main__':
nums = [int(line.strip('\n')) for line in open(sys.argv[1])]
# challenge 1
res1 = 0
changes, values = {}, {}
change_set = set([])
for n in nums:
secret = n
changes[n] = [[] for i in range(2000)]
values[n] = [0] * 2000
ob = int(str(secret)[-1])
for i in range(2000):
secret = prg(secret)
bananas = int(str(secret)[-1])
for j in range(i,min(2000,i+4)):
changes[n][j].append(bananas - ob)
values[n][i] = bananas
ob = bananas
res1 += secret
print(f"challenge 1:\n{res1}\n")
# challenge 2 (could be more efficient i guess)
res2 = 0
for n in nums:
change_set = change_set.union(set([tuple(c) if c[-1] > 1 else () for c in changes[n]]))
for c in list(change_set):
if c != () and c[-1] > 1 and sum([list(c) in changes[num] for num in nums]) > 100:
res2 = max(sum([values[num][changes[num].index(list(c))] if list(c) in changes[num] else 0 for num in nums]), res2)
print(f"challenge 2:\n{res2}")
+4
View File
@@ -0,0 +1,4 @@
1
10
100
2024
+1
View File
@@ -0,0 +1 @@
123
+4
View File
@@ -0,0 +1,4 @@
1
2
3
2024
+1515
View File
File diff suppressed because it is too large. Load diff
+93
View File
@@ -0,0 +1,93 @@
--- Day 23: LAN Party ---
As The Historians wander around a secure area at Easter Bunny HQ, you come across posters for a LAN party scheduled for today! Maybe you can find it; you connect to a nearby datalink port and download a map of the local network (your puzzle input).
The network map provides a list of every connection between two computers. For example:
kh-tc
qp-kh
de-cg
ka-co
yn-aq
qp-ub
cg-tb
vc-aq
tb-ka
wh-tc
yn-cg
kh-ub
ta-co
de-co
tc-td
tb-wq
wh-td
ta-ka
td-qp
aq-cg
wq-ub
ub-vc
de-ta
wq-aq
wq-vc
wh-yn
ka-de
kh-ta
co-tc
wh-qp
tb-vc
td-yn
Each line of text in the network map represents a single connection; the line kh-tc represents a connection between the computer named kh and the computer named tc. Connections aren't directional; tc-kh would mean exactly the same thing.
LAN parties typically involve multiplayer games, so maybe you can locate it by finding groups of connected computers. Start by looking for sets of three computers where each computer in the set is connected to the other two computers.
In this example, there are 12 such sets of three inter-connected computers:
aq,cg,yn
aq,vc,wq
co,de,ka
co,de,ta
co,ka,ta
de,ka,ta
kh,qp,ub
qp,td,wh
tb,vc,wq
tc,td,wh
td,wh,yn
ub,vc,wq
If the Chief Historian is here, and he's at the LAN party, it would be best to know that right away. You're pretty sure his computer's name starts with t, so consider only sets of three computers where at least one computer's name starts with t. That narrows the list down to 7 sets of three inter-connected computers:
co,de,ta
co,ka,ta
de,ka,ta
qp,td,wh
tb,vc,wq
tc,td,wh
td,wh,yn
Find all the sets of three inter-connected computers. How many contain at least one computer with a name that starts with t?
Your puzzle answer was 1062.
--- Part Two ---
There are still way too many results to go through them all. You'll have to find the LAN party another way and go there yourself.
Since it doesn't seem like any employees are around, you figure they must all be at the LAN party. If that's true, the LAN party will be the largest set of computers that are all connected to each other. That is, for each computer at the LAN party, that computer will have a connection to every other computer at the LAN party.
In the above example, the largest set of computers that are all connected to each other is made up of co, de, ka, and ta. Each computer in this set has a connection to every other computer in the set:
ka-co
ta-co
de-co
ta-ka
de-ta
ka-de
The LAN party posters say that the password to get into the LAN party is the name of every computer at the LAN party, sorted alphabetically, then joined together with commas. (The people running the LAN party are clearly a bunch of nerds.) In this example, the password would be co,de,ka,ta.
What is the password to get into the LAN party?
Your puzzle answer was bz,cs,fx,ms,oz,po,sy,uh,uv,vw,xu,zj,zm.
Both parts of this puzzle are complete! They provide two gold stars: **
+31
View File
@@ -0,0 +1,31 @@
#!/usr/bin/env python3
import sys
import networkx as nx
if __name__ == '__main__':
pcs = [line.strip('\n').split('-') for line in open(sys.argv[1])]
d = {}
t = set([])
for con in pcs:
if con[0] in d:
d[con[0]].append(con[1])
else: d[con[0]] = [con[1]]
if con[0].startswith('t'): t.add(con[0])
if con[1].startswith('t'): t.add(con[1])
G = nx.Graph(d)
res1 = 0
for clique in nx.enumerate_all_cliques(G):
if len(clique) == 3 and len(set(clique).intersection(t)) > 0: res1 += 1
if len(clique) == 4: break
res2 = ','.join(sorted(sorted([c for c in nx.find_cliques(G)],key=len, reverse=True)[0]))
# challenge 1
print(f"challenge 1:\n{res1}\n")
# challenge 2
print(f"challenge 2:\n{res2}")
+32
View File
@@ -0,0 +1,32 @@
kh-tc
qp-kh
de-cg
ka-co
yn-aq
qp-ub
cg-tb
vc-aq
tb-ka
wh-tc
yn-cg
kh-ub
ta-co
de-co
tc-td
tb-wq
wh-td
ta-ka
td-qp
aq-cg
wq-ub
ub-vc
de-ta
wq-aq
wq-vc
wh-yn
ka-de
kh-ta
co-tc
wh-qp
tb-vc
td-yn
+3380
View File
File diff suppressed because it is too large. Load diff
+200
View File
@@ -0,0 +1,200 @@
--- Day 24: Crossed Wires ---
You and The Historians arrive at the edge of a large grove somewhere in the jungle. After the last incident, the Elves installed a small device that monitors the fruit. While The Historians search the grove, one of them asks if you can take a look at the monitoring device; apparently, it's been malfunctioning recently.
The device seems to be trying to produce a number through some boolean logic gates. Each gate has two inputs and one output. The gates all operate on values that are either true (1) or false (0).
AND gates output 1 if both inputs are 1; if either input is 0, these gates output 0.
OR gates output 1 if one or both inputs is 1; if both inputs are 0, these gates output 0.
XOR gates output 1 if the inputs are different; if the inputs are the same, these gates output 0.
Gates wait until both inputs are received before producing output; wires can carry 0, 1 or no value at all. There are no loops; once a gate has determined its output, the output will not change until the whole system is reset. Each wire is connected to at most one gate output, but can be connected to many gate inputs.
Rather than risk getting shocked while tinkering with the live system, you write down all of the gate connections and initial wire values (your puzzle input) so you can consider them in relative safety. For example:
x00: 1
x01: 1
x02: 1
y00: 0
y01: 1
y02: 0
x00 AND y00 -> z00
x01 XOR y01 -> z01
x02 OR y02 -> z02
Because gates wait for input, some wires need to start with a value (as inputs to the entire system). The first section specifies these values. For example, x00: 1 means that the wire named x00 starts with the value 1 (as if a gate is already outputting that value onto that wire).
The second section lists all of the gates and the wires connected to them. For example, x00 AND y00 -> z00 describes an instance of an AND gate which has wires x00 and y00 connected to its inputs and which will write its output to wire z00.
In this example, simulating these gates eventually causes 0 to appear on wire z00, 0 to appear on wire z01, and 1 to appear on wire z02.
Ultimately, the system is trying to produce a number by combining the bits on all wires starting with z. z00 is the least significant bit, then z01, then z02, and so on.
In this example, the three output bits form the binary number 100 which is equal to the decimal number 4.
Here's a larger example:
x00: 1
x01: 0
x02: 1
x03: 1
x04: 0
y00: 1
y01: 1
y02: 1
y03: 1
y04: 1
ntg XOR fgs -> mjb
y02 OR x01 -> tnw
kwq OR kpj -> z05
x00 OR x03 -> fst
tgd XOR rvg -> z01
vdt OR tnw -> bfw
bfw AND frj -> z10
ffh OR nrd -> bqk
y00 AND y03 -> djm
y03 OR y00 -> psh
bqk OR frj -> z08
tnw OR fst -> frj
gnj AND tgd -> z11
bfw XOR mjb -> z00
x03 OR x00 -> vdt
gnj AND wpb -> z02
x04 AND y00 -> kjc
djm OR pbm -> qhw
nrd AND vdt -> hwm
kjc AND fst -> rvg
y04 OR y02 -> fgs
y01 AND x02 -> pbm
ntg OR kjc -> kwq
psh XOR fgs -> tgd
qhw XOR tgd -> z09
pbm OR djm -> kpj
x03 XOR y03 -> ffh
x00 XOR y04 -> ntg
bfw OR bqk -> z06
nrd XOR fgs -> wpb
frj XOR qhw -> z04
bqk OR frj -> z07
y03 OR x01 -> nrd
hwm AND bqk -> z03
tgd XOR rvg -> z12
tnw OR pbm -> gnj
After waiting for values on all wires starting with z, the wires in this system have the following values:
bfw: 1
bqk: 1
djm: 1
ffh: 0
fgs: 1
frj: 1
fst: 1
gnj: 1
hwm: 1
kjc: 0
kpj: 1
kwq: 0
mjb: 1
nrd: 1
ntg: 0
pbm: 1
psh: 1
qhw: 1
rvg: 0
tgd: 0
tnw: 1
vdt: 1
wpb: 0
z00: 0
z01: 0
z02: 0
z03: 1
z04: 0
z05: 1
z06: 1
z07: 1
z08: 1
z09: 1
z10: 1
z11: 0
z12: 0
Combining the bits from all wires starting with z produces the binary number 0011111101000. Converting this number to decimal produces 2024.
Simulate the system of gates and wires. What decimal number does it output on the wires starting with z?
Your puzzle answer was 53755311654662.
--- Part Two ---
After inspecting the monitoring device more closely, you determine that the system you're simulating is trying to add two binary numbers.
Specifically, it is treating the bits on wires starting with x as one binary number, treating the bits on wires starting with y as a second binary number, and then attempting to add those two numbers together. The output of this operation is produced as a binary number on the wires starting with z. (In all three cases, wire 00 is the least significant bit, then 01, then 02, and so on.)
The initial values for the wires in your puzzle input represent just one instance of a pair of numbers that sum to the wrong value. Ultimately, any two binary numbers provided as input should be handled correctly. That is, for any combination of bits on wires starting with x and wires starting with y, the sum of the two numbers those bits represent should be produced as a binary number on the wires starting with z.
For example, if you have an addition system with four x wires, four y wires, and five z wires, you should be able to supply any four-bit number on the x wires, any four-bit number on the y numbers, and eventually find the sum of those two numbers as a five-bit number on the z wires. One of the many ways you could provide numbers to such a system would be to pass 11 on the x wires (1011 in binary) and 13 on the y wires (1101 in binary):
x00: 1
x01: 1
x02: 0
x03: 1
y00: 1
y01: 0
y02: 1
y03: 1
If the system were working correctly, then after all gates are finished processing, you should find 24 (11+13) on the z wires as the five-bit binary number 11000:
z00: 0
z01: 0
z02: 0
z03: 1
z04: 1
Unfortunately, your actual system needs to add numbers with many more bits and therefore has many more wires.
Based on forensic analysis of scuff marks and scratches on the device, you can tell that there are exactly four pairs of gates whose output wires have been swapped. (A gate can only be in at most one such pair; no gate's output was swapped multiple times.)
For example, the system below is supposed to find the bitwise AND of the six-bit number on x00 through x05 and the six-bit number on y00 through y05 and then write the result as a six-bit number on z00 through z05:
x00: 0
x01: 1
x02: 0
x03: 1
x04: 0
x05: 1
y00: 0
y01: 0
y02: 1
y03: 1
y04: 0
y05: 1
x00 AND y00 -> z05
x01 AND y01 -> z02
x02 AND y02 -> z01
x03 AND y03 -> z03
x04 AND y04 -> z04
x05 AND y05 -> z00
However, in this example, two pairs of gates have had their output wires swapped, causing the system to produce wrong answers. The first pair of gates with swapped outputs is x00 AND y00 -> z05 and x05 AND y05 -> z00; the second pair of gates is x01 AND y01 -> z02 and x02 AND y02 -> z01. Correcting these two swaps results in this system that works as intended for any set of initial values on wires that start with x or y:
x00 AND y00 -> z00
x01 AND y01 -> z01
x02 AND y02 -> z02
x03 AND y03 -> z03
x04 AND y04 -> z04
x05 AND y05 -> z05
In this example, two pairs of gates have outputs that are involved in a swap. By sorting their output wires' names and joining them with commas, the list of wires involved in swaps is z00,z01,z02,z05.
Of course, your actual system is much more complex than this, and the gates that need their outputs swapped could be anywhere, not just attached to a wire starting with z. If you were to determine that you need to swap output wires aaa with eee, ooo with z99, bbb with ccc, and aoc with z24, your answer would be aaa,aoc,bbb,ccc,eee,ooo,z24,z99.
Your system of gates and wires has four pairs of gates which need their output wires swapped - eight wires in total. Determine which four pairs of gates need their outputs swapped so that your system correctly performs addition; what do you get if you sort the names of the eight wires involved in a swap and then join those names with commas?
Your puzzle answer was dkr,ggk,hhh,htp,rhv,z05,z15,z20.
Both parts of this puzzle are complete! They provide two gold stars: **
+45
View File
@@ -0,0 +1,45 @@
#!/usr/bin/env python3
import sys
def replace_ins(gate, gates, inp):
g0, f, g1 = gate.split(' ')
if g0 in inp and g1 in inp: return inp[g0] + ' ' + f + ' ' + inp[g1]
elif g0[0] not in ['x', 'y'] and g1[0] in ['x', 'y']:
return '(' + replace_ins(gates[g0], gates, inp) + ')' + ' ' + f + ' ' + inp[g1]
elif g0[0] in ['x', 'y'] and g1[0] not in ['x', 'y']:
return inp[g0] + ' ' + f + ' ' + '(' + replace_ins(gates[g1], gates, inp) + ')'
else:
return '(' + replace_ins(gates[g0], gates, inp) + ')' + ' ' + f + ' ' + '(' + replace_ins(gates[g1], gates, inp) + ')'
if __name__ == '__main__':
values, gates = open(sys.argv[1]).read().split('\n\n')
ins = {v.split(': ')[0]: v.split(': ')[1] for v in values.split('\n')}
gates = {g.split(' -> ')[1]: g.split(' -> ')[0].lower().replace('xor', '^') for g in gates.split('\n')[:-1]}
out = {}
for g in gates.keys():
exec('out[g] = ' + replace_ins(gates[g], gates, ins))
# for g in gates.keys():
# g0, f, g1 = gates[g].split(' ')
# print(g, g0, f, g1)
# print(out[g])
# challenge 1
res1 = 0
for (o,v) in sorted(out.items(),key=lambda x: x[0],reverse=True):
if o.startswith('z'): res1 = (res1 << 1) | v
print(f"challenge 1:\n{res1}\n")
# challenge 2, empiric solution
x, y = 0, 0
for bit in [int(v) for (o,v) in sorted(ins.items(),key=lambda x: x[0],reverse=True) if o.startswith('x')]:
x = (x << 1) | bit
for bit in [int(v) for (o,v) in sorted(ins.items(),key=lambda x: x[0],reverse=True) if o.startswith('y')]:
y = (y << 1) | bit
res2 = ','.join(sorted(['dkr', 'z05', 'z15', 'htp', 'ggk', 'rhv', 'hhh', 'z20']))
print(f"challenge 2:\n{res2}")
+10
View File
@@ -0,0 +1,10 @@
x00: 1
x01: 1
x02: 1
y00: 0
y01: 1
y02: 0
x00 AND y00 -> z00
x01 XOR y01 -> z01
x02 OR y02 -> z02
+47
View File
@@ -0,0 +1,47 @@
x00: 1
x01: 0
x02: 1
x03: 1
x04: 0
y00: 1
y01: 1
y02: 1
y03: 1
y04: 1
ntg XOR fgs -> mjb
y02 OR x01 -> tnw
kwq OR kpj -> z05
x00 OR x03 -> fst
tgd XOR rvg -> z01
vdt OR tnw -> bfw
bfw AND frj -> z10
ffh OR nrd -> bqk
y00 AND y03 -> djm
y03 OR y00 -> psh
bqk OR frj -> z08
tnw OR fst -> frj
gnj AND tgd -> z11
bfw XOR mjb -> z00
x03 OR x00 -> vdt
gnj AND wpb -> z02
x04 AND y00 -> kjc
djm OR pbm -> qhw
nrd AND vdt -> hwm
kjc AND fst -> rvg
y04 OR y02 -> fgs
y01 AND x02 -> pbm
ntg OR kjc -> kwq
psh XOR fgs -> tgd
qhw XOR tgd -> z09
pbm OR djm -> kpj
x03 XOR y03 -> ffh
x00 XOR y04 -> ntg
bfw OR bqk -> z06
nrd XOR fgs -> wpb
frj XOR qhw -> z04
bqk OR frj -> z07
y03 OR x01 -> nrd
hwm AND bqk -> z03
tgd XOR rvg -> z12
tnw OR pbm -> gnj
+19
View File
@@ -0,0 +1,19 @@
x00: 0
x01: 1
x02: 0
x03: 1
x04: 0
x05: 1
y00: 0
y01: 0
y02: 1
y03: 1
y04: 0
y05: 1
x00 AND y00 -> z00
x01 AND y01 -> z01
x02 AND y02 -> z02
x03 AND y03 -> z03
x04 AND y04 -> z04
x05 AND y05 -> z05
+313
View File
@@ -0,0 +1,313 @@
x00: 1
x01: 0
x02: 1
x03: 1
x04: 0
x05: 0
x06: 1
x07: 1
x08: 0
x09: 1
x10: 1
x11: 1
x12: 1
x13: 0
x14: 0
x15: 1
x16: 0
x17: 0
x18: 1
x19: 1
x20: 0
x21: 1
x22: 1
x23: 0
x24: 1
x25: 0
x26: 1
x27: 1
x28: 1
x29: 1
x30: 0
x31: 0
x32: 0
x33: 0
x34: 0
x35: 0
x36: 0
x37: 1
x38: 0
x39: 0
x40: 0
x41: 0
x42: 0
x43: 1
x44: 1
y00: 1
y01: 0
y02: 0
y03: 1
y04: 1
y05: 0
y06: 0
y07: 0
y08: 0
y09: 0
y10: 0
y11: 1
y12: 0
y13: 1
y14: 1
y15: 0
y16: 1
y17: 0
y18: 1
y19: 0
y20: 0
y21: 0
y22: 1
y23: 1
y24: 0
y25: 0
y26: 1
y27: 0
y28: 0
y29: 1
y30: 0
y31: 1
y32: 1
y33: 1
y34: 0
y35: 0
y36: 0
y37: 0
y38: 1
y39: 1
y40: 0
y41: 0
y42: 0
y43: 1
y44: 1
x14 AND y14 -> cwj
dhf OR hrr -> gcs
y44 XOR x44 -> pfh
fqq OR hww -> bpg
wmd OR kvv -> jts
khg AND hdd -> nfn
y35 XOR x35 -> rpk
bhw XOR sth -> htp
x13 XOR y13 -> gnf
y39 AND x39 -> qwn
nhr XOR wks -> z19
x40 AND y40 -> mpd
pvw AND fsf -> hsf
y29 AND x29 -> sbk
kqk OR shk -> gjs
swm OR rrk -> fww
x30 AND y30 -> bpn
mts XOR ntr -> z02
y23 XOR x23 -> vsh
x07 XOR y07 -> cwh
jqq OR trc -> wrr
y14 XOR x14 -> khg
y12 XOR x12 -> fsf
x27 AND y27 -> tts
bjs AND vnp -> tsp
hcq OR pjv -> fvm
vsk XOR svf -> z42
dwp AND fwn -> rsm
x30 XOR y30 -> bjs
y19 AND x19 -> pjv
x20 XOR y20 -> mvv
vpb XOR jmq -> z43
tkd AND shd -> thc
nbw XOR wjn -> z38
wjn AND nbw -> jqq
y17 XOR x17 -> hhm
dkr OR fdd -> bvc
qjh AND qcm -> mcd
x26 XOR y26 -> fwn
dsf AND tjv -> bsh
qjs AND ncw -> nhw
nsg XOR kkt -> z04
hhb OR htp -> mqr
hgs XOR hhh -> z21
wrr XOR htw -> z39
cwh XOR tpd -> z07
gcs XOR hdc -> dkr
rng AND mdw -> rhp
cwh AND tpd -> ddj
x43 AND y43 -> jjk
hhm AND jts -> swm
x04 AND y04 -> hrr
qhg OR jgj -> shd
y44 AND x44 -> kbb
gpb AND cwn -> prp
y42 AND x42 -> vcd
y38 AND x38 -> trc
mvv XOR fvm -> hhh
qjh XOR qcm -> z33
y05 AND x05 -> z05
pfh AND gqg -> khw
y03 XOR x03 -> tkd
x25 XOR y25 -> dwk
phm AND bjw -> bcm
y31 XOR x31 -> gpb
y28 AND x28 -> pcd
hdc AND gcs -> fdd
ffw XOR cjf -> z11
y21 XOR x21 -> hgs
fcd XOR nkw -> z41
kqs XOR vjk -> z22
x36 AND y36 -> ggk
x34 XOR y34 -> tjv
y25 AND x25 -> cbg
x24 XOR y24 -> mdw
rpk AND rfs -> fkk
x24 AND y24 -> rwd
y11 AND x11 -> mdb
phm XOR bjw -> z40
tsp OR bpn -> cwn
y29 XOR x29 -> nrv
nhw OR qdc -> qcm
tjv XOR dsf -> z34
x21 AND y21 -> mvp
x08 AND y08 -> bnr
gqr OR mdb -> pvw
sfw AND gnf -> tsh
mfc AND gqf -> bwd
y35 AND x35 -> nbb
x09 XOR y09 -> csk
qfj OR mqg -> z20
x22 AND y22 -> kqk
x08 XOR y08 -> wcg
y37 XOR x37 -> mfc
wrn XOR fww -> z18
rvw OR rsm -> dnb
x23 AND y23 -> mcw
wwc OR hch -> ntr
x22 XOR y22 -> vjk
gqf XOR mfc -> z37
sth AND bhw -> z15
rng XOR mdw -> z24
y04 XOR x04 -> kkt
fsf XOR pvw -> z12
bpg XOR kpk -> z10
x02 AND y02 -> qhg
x19 XOR y19 -> nhr
cbg OR srg -> dwp
pfh XOR gqg -> z44
y00 AND x00 -> wsg
x33 XOR y33 -> qjh
jts XOR hhm -> z17
y32 XOR x32 -> ncw
fww AND wrn -> gfq
qcn OR fjq -> vsk
nsg AND kkt -> dhf
y32 AND x32 -> qdc
bgf OR sfb -> tpd
dnb AND bsv -> bcn
y28 XOR x28 -> phk
tds AND mqr -> kvv
wtf OR qwn -> phm
pss XOR csk -> z09
kwp OR sbk -> vnp
y26 AND x26 -> rvw
mvv AND fvm -> qfj
y15 AND x15 -> hhb
hbb XOR nrv -> z29
dsn AND wcg -> rms
bnr OR rms -> pss
nfn OR cwj -> sth
mvp OR wms -> kqs
khg XOR hdd -> z14
bwd OR rnr -> wjn
x18 AND y18 -> twv
rfs XOR rpk -> z35
dwk AND fbs -> srg
prp OR dmf -> qjs
nbb OR fkk -> hpg
ncw XOR qjs -> z32
pcd OR wff -> hbb
y43 XOR x43 -> jmq
hkg OR mcw -> rng
x09 AND y09 -> hww
y13 AND x13 -> fhs
qfg AND bvc -> bgf
y18 XOR x18 -> wrn
phk XOR rkf -> z28
x06 XOR y06 -> qfg
y00 XOR x00 -> z00
x16 XOR y16 -> tds
hgs AND hhh -> wms
fkc OR vcd -> vpb
y03 AND x03 -> rrr
thc OR rrr -> nsg
sfw XOR gnf -> z13
bvc XOR qfg -> z06
wsg AND pnw -> hch
y39 XOR x39 -> htw
x12 AND y12 -> npc
vjk AND kqs -> shk
ggk XOR hpg -> z36
gjs XOR vsh -> z23
ddj OR ktn -> dsn
x38 XOR y38 -> nbw
y33 AND x33 -> mqv
ggk AND hpg -> bqf
npc OR hsf -> sfw
y16 AND x16 -> wmd
vsh AND gjs -> hkg
x10 XOR y10 -> kpk
mcd OR mqv -> dsf
x05 XOR y05 -> hdc
wcg XOR dsn -> z08
x41 XOR y41 -> nkw
mts AND ntr -> jgj
bcm OR mpd -> fcd
tds XOR mqr -> z16
vsk AND svf -> fkc
x27 XOR y27 -> bsv
bqf OR rhv -> gqf
kbb OR khw -> z45
nrv AND hbb -> kwp
csk AND pss -> fqq
y34 AND x34 -> cjq
x20 AND y20 -> mqg
tsh OR fhs -> hdd
wks AND nhr -> hcq
cjq OR bsh -> rfs
gfq OR twv -> wks
rwd OR rhp -> fbs
y37 AND x37 -> rnr
vfs OR jgd -> cjf
y31 AND x31 -> dmf
kpk AND bpg -> jgd
y36 XOR x36 -> rhv
y42 XOR x42 -> svf
bjs XOR vnp -> z30
cst OR jjk -> gqg
y40 XOR x40 -> bjw
cjf AND ffw -> gqr
fcd AND nkw -> fjq
y01 XOR x01 -> pnw
dnb XOR bsv -> z27
wsg XOR pnw -> z01
y41 AND x41 -> qcn
y06 AND x06 -> sfb
gpb XOR cwn -> z31
x02 XOR y02 -> mts
shd XOR tkd -> z03
dwk XOR fbs -> z25
y11 XOR x11 -> ffw
phk AND rkf -> wff
jmq AND vpb -> cst
bcn OR tts -> rkf
y07 AND x07 -> ktn
x17 AND y17 -> rrk
x10 AND y10 -> vfs
fwn XOR dwp -> z26
x01 AND y01 -> wwc
htw AND wrr -> wtf
y15 XOR x15 -> bhw
+313
View File
@@ -0,0 +1,313 @@
x00: 1
x01: 0
x02: 1
x03: 1
x04: 0
x05: 0
x06: 1
x07: 1
x08: 0
x09: 1
x10: 1
x11: 1
x12: 1
x13: 0
x14: 0
x15: 1
x16: 0
x17: 0
x18: 1
x19: 1
x20: 0
x21: 1
x22: 1
x23: 0
x24: 1
x25: 0
x26: 1
x27: 1
x28: 1
x29: 1
x30: 0
x31: 0
x32: 0
x33: 0
x34: 0
x35: 0
x36: 0
x37: 1
x38: 0
x39: 0
x40: 0
x41: 0
x42: 0
x43: 1
x44: 1
y00: 1
y01: 0
y02: 0
y03: 1
y04: 1
y05: 0
y06: 0
y07: 0
y08: 0
y09: 0
y10: 0
y11: 1
y12: 0
y13: 1
y14: 1
y15: 0
y16: 1
y17: 0
y18: 1
y19: 0
y20: 0
y21: 0
y22: 1
y23: 1
y24: 0
y25: 0
y26: 1
y27: 0
y28: 0
y29: 1
y30: 0
y31: 1
y32: 1
y33: 1
y34: 0
y35: 0
y36: 0
y37: 0
y38: 1
y39: 1
y40: 0
y41: 0
y42: 0
y43: 1
y44: 1
x14 AND y14 -> cwj
dhf OR hrr -> gcs
y44 XOR x44 -> pfh
fqq OR hww -> bpg
wmd OR kvv -> jts
khg AND hdd -> nfn
y35 XOR x35 -> rpk
bhw XOR sth -> htp
x13 XOR y13 -> gnf
y39 AND x39 -> qwn
nhr XOR wks -> z19
x40 AND y40 -> mpd
pvw AND fsf -> hsf
y29 AND x29 -> sbk
kqk OR shk -> gjs
swm OR rrk -> fww
x30 AND y30 -> bpn
mts XOR ntr -> z02
y23 XOR x23 -> vsh
x07 XOR y07 -> cwh
jqq OR trc -> wrr
y14 XOR x14 -> khg
y12 XOR x12 -> fsf
x27 AND y27 -> tts
bjs AND vnp -> tsp
hcq OR pjv -> fvm
vsk XOR svf -> z42
dwp AND fwn -> rsm
x30 XOR y30 -> bjs
y19 AND x19 -> pjv
x20 XOR y20 -> qfg
vpb XOR jmq -> z43
tkd AND shd -> thc
nbw XOR wjn -> z38
wjn AND nbw -> jqq
y17 XOR x17 -> hhm
dkr OR fdd -> bvc
qjh AND qcm -> mcd
x26 XOR y26 -> fwn
dsf AND tjv -> bsh
qjs AND ncw -> nhw
nsg XOR kkt -> z04
hhb OR htp -> mqr
hgs XOR hhh -> z21
wrr XOR htw -> z39
cwh XOR tpd -> z07
gcs XOR hdc -> dkr
rng AND mdw -> rhp
cwh AND tpd -> ddj
x43 AND y43 -> jjk
hhm AND jts -> swm
x04 AND y04 -> hrr
qhg OR jgj -> shd
y44 AND x44 -> kbb
gpb AND cwn -> prp
y42 AND x42 -> vcd
y38 AND x38 -> trc
mvv XOR fvm -> hhh
qjh XOR qcm -> z33
y05 AND x05 -> z15
pfh AND gqg -> khw
y03 XOR x03 -> tkd
x25 XOR y25 -> dwk
phm AND bjw -> bcm
y31 XOR x31 -> gpb
y28 AND x28 -> pcd
hdc AND gcs -> fdd
ffw XOR cjf -> z11
y21 XOR x21 -> hgs
fcd XOR nkw -> z41
kqs XOR vjk -> z22
x36 AND y36 -> ggk
x34 XOR y34 -> tjv
y25 AND x25 -> cbg
x24 XOR y24 -> mdw
rpk AND rfs -> fkk
x24 AND y24 -> rwd
y11 AND x11 -> mdb
phm XOR bjw -> z40
tsp OR bpn -> cwn
y29 XOR x29 -> nrv
nhw OR qdc -> qcm
tjv XOR dsf -> z34
x21 AND y21 -> mvp
x08 AND y08 -> bnr
gqr OR mdb -> pvw
sfw AND gnf -> tsh
mfc AND gqf -> bwd
y35 AND x35 -> nbb
x09 XOR y09 -> csk
qfj OR mqg -> z20
x22 AND y22 -> kqk
x08 XOR y08 -> wcg
y37 XOR x37 -> mfc
wrn XOR fww -> z18
rvw OR rsm -> dnb
x23 AND y23 -> mcw
wwc OR hch -> ntr
x22 XOR y22 -> vjk
gqf XOR mfc -> z37
sth AND bhw -> z05
rng XOR mdw -> z24
y04 XOR x04 -> kkt
fsf XOR pvw -> z12
bpg XOR kpk -> z10
x02 AND y02 -> qhg
x19 XOR y19 -> nhr
cbg OR srg -> dwp
pfh XOR gqg -> z44
y00 AND x00 -> wsg
x33 XOR y33 -> qjh
jts XOR hhm -> z16
y32 XOR x32 -> ncw
fww AND wrn -> gfq
qcn OR fjq -> vsk
nsg AND kkt -> dhf
y32 AND x32 -> qdc
bgf OR sfb -> tpd
dnb AND bsv -> bcn
y28 XOR x28 -> phk
tds AND mqr -> kvv
wtf OR qwn -> phm
pss XOR csk -> z09
kwp OR sbk -> vnp
y26 AND x26 -> rvw
mvv AND fvm -> qfj
y15 AND x15 -> hhb
hbb XOR nrv -> z29
dsn AND wcg -> rms
bnr OR rms -> pss
nfn OR cwj -> sth
mvp OR wms -> kqs
khg XOR hdd -> z14
bwd OR rnr -> wjn
x18 AND y18 -> twv
rfs XOR rpk -> z35
dwk AND fbs -> srg
prp OR dmf -> qjs
nbb OR fkk -> hpg
ncw XOR qjs -> z32
pcd OR wff -> hbb
y43 XOR x43 -> jmq
hkg OR mcw -> rng
x09 AND y09 -> hww
y13 AND x13 -> fhs
qfg AND bvc -> bgf
y18 XOR x18 -> wrn
phk XOR rkf -> z28
x06 XOR y06 -> mvv
y00 XOR x00 -> z00
x16 XOR y16 -> tds
hgs AND hhh -> wms
fkc OR vcd -> vpb
y03 AND x03 -> rrr
thc OR rrr -> nsg
sfw XOR gnf -> z13
bvc XOR qfg -> z06
wsg AND pnw -> hch
y39 XOR x39 -> htw
x12 AND y12 -> npc
vjk AND kqs -> shk
ggk XOR hpg -> z36
gjs XOR vsh -> z23
ddj OR ktn -> dsn
x38 XOR y38 -> nbw
y33 AND x33 -> mqv
ggk AND hpg -> bqf
npc OR hsf -> sfw
y16 AND x16 -> wmd
vsh AND gjs -> hkg
x10 XOR y10 -> kpk
mcd OR mqv -> dsf
x05 XOR y05 -> hdc
wcg XOR dsn -> z08
x41 XOR y41 -> nkw
mts AND ntr -> jgj
bcm OR mpd -> fcd
tds XOR mqr -> z17
vsk AND svf -> fkc
x27 XOR y27 -> bsv
bqf OR rhv -> gqf
kbb OR khw -> z45
nrv AND hbb -> kwp
csk AND pss -> fqq
y34 AND x34 -> cjq
x20 AND y20 -> mqg
tsh OR fhs -> hdd
wks AND nhr -> hcq
cjq OR bsh -> rfs
gfq OR twv -> wks
rwd OR rhp -> fbs
y37 AND x37 -> rnr
vfs OR jgd -> cjf
y31 AND x31 -> dmf
kpk AND bpg -> jgd
y36 XOR x36 -> rhv
y42 XOR x42 -> svf
bjs XOR vnp -> z30
cst OR jjk -> gqg
y40 XOR x40 -> bjw
cjf AND ffw -> gqr
fcd AND nkw -> fjq
y01 XOR x01 -> pnw
dnb XOR bsv -> z27
wsg XOR pnw -> z01
y41 AND x41 -> qcn
y06 AND x06 -> sfb
gpb XOR cwn -> z31
x02 XOR y02 -> mts
shd XOR tkd -> z03
dwk XOR fbs -> z25
y11 XOR x11 -> ffw
phk AND rkf -> wff
jmq AND vpb -> cst
bcn OR tts -> rkf
y07 AND x07 -> ktn
x17 AND y17 -> rrk
x10 AND y10 -> vfs
fwn XOR dwp -> z26
x01 AND y01 -> wwc
htw AND wrr -> wtf
y15 XOR x15 -> bhw
+313
View File
@@ -0,0 +1,313 @@
x00: 1
x01: 1
x02: 1
x03: 1
x04: 0
x05: 0
x06: 0
x07: 0
x08: 1
x09: 0
x10: 0
x11: 1
x12: 0
x13: 1
x14: 0
x15: 1
x16: 0
x17: 0
x18: 0
x19: 0
x20: 1
x21: 1
x22: 0
x23: 1
x24: 0
x25: 0
x26: 0
x27: 0
x28: 1
x29: 0
x30: 1
x31: 0
x32: 0
x33: 0
x34: 0
x35: 0
x36: 0
x37: 0
x38: 0
x39: 1
x40: 0
x41: 0
x42: 0
x43: 0
x44: 1
y00: 1
y01: 1
y02: 0
y03: 0
y04: 0
y05: 1
y06: 0
y07: 0
y08: 1
y09: 0
y10: 0
y11: 0
y12: 0
y13: 0
y14: 1
y15: 0
y16: 0
y17: 0
y18: 0
y19: 0
y20: 1
y21: 1
y22: 1
y23: 0
y24: 0
y25: 1
y26: 1
y27: 1
y28: 1
y29: 1
y30: 1
y31: 1
y32: 1
y33: 1
y34: 1
y35: 1
y36: 1
y37: 1
y38: 1
y39: 1
y40: 1
y41: 1
y42: 1
y43: 1
y44: 1
x14 AND y14 -> cwj
dhf OR hrr -> gcs
y44 XOR x44 -> pfh
fqq OR hww -> bpg
wmd OR kvv -> jts
khg AND hdd -> nfn
y35 XOR x35 -> rpk
bhw XOR sth -> z15
x13 XOR y13 -> gnf
y39 AND x39 -> qwn
nhr XOR wks -> z19
x40 AND y40 -> mpd
pvw AND fsf -> hsf
y29 AND x29 -> sbk
kqk OR shk -> gjs
swm OR rrk -> fww
x30 AND y30 -> bpn
mts XOR ntr -> z02
y23 XOR x23 -> vsh
x07 XOR y07 -> cwh
jqq OR trc -> wrr
y14 XOR x14 -> khg
y12 XOR x12 -> fsf
x27 AND y27 -> tts
bjs AND vnp -> tsp
hcq OR pjv -> fvm
vsk XOR svf -> z42
dwp AND fwn -> rsm
x30 XOR y30 -> bjs
y19 AND x19 -> pjv
x20 XOR y20 -> mvv
vpb XOR jmq -> z43
tkd AND shd -> thc
nbw XOR wjn -> z38
wjn AND nbw -> jqq
y17 XOR x17 -> hhm
dkr OR fdd -> bvc
qjh AND qcm -> mcd
x26 XOR y26 -> fwn
dsf AND tjv -> bsh
qjs AND ncw -> nhw
nsg XOR kkt -> z04
hhb OR htp -> mqr
hgs XOR hhh -> z21
wrr XOR htw -> z39
cwh XOR tpd -> z07
gcs XOR hdc -> z05
rng AND mdw -> rhp
cwh AND tpd -> ddj
x43 AND y43 -> jjk
hhm AND jts -> swm
x04 AND y04 -> hrr
qhg OR jgj -> shd
y44 AND x44 -> kbb
gpb AND cwn -> prp
y42 AND x42 -> vcd
y38 AND x38 -> trc
mvv XOR fvm -> z20
qjh XOR qcm -> z33
y05 AND x05 -> dkr
pfh AND gqg -> khw
y03 XOR x03 -> tkd
x25 XOR y25 -> dwk
phm AND bjw -> bcm
y31 XOR x31 -> gpb
y28 AND x28 -> pcd
hdc AND gcs -> fdd
ffw XOR cjf -> z11
y21 XOR x21 -> hgs
fcd XOR nkw -> z41
kqs XOR vjk -> z22
x36 AND y36 -> rhv
x34 XOR y34 -> tjv
y25 AND x25 -> cbg
x24 XOR y24 -> mdw
rpk AND rfs -> fkk
x24 AND y24 -> rwd
y11 AND x11 -> mdb
phm XOR bjw -> z40
tsp OR bpn -> cwn
y29 XOR x29 -> nrv
nhw OR qdc -> qcm
tjv XOR dsf -> z34
x21 AND y21 -> mvp
x08 AND y08 -> bnr
gqr OR mdb -> pvw
sfw AND gnf -> tsh
mfc AND gqf -> bwd
y35 AND x35 -> nbb
x09 XOR y09 -> csk
qfj OR mqg -> hhh
x22 AND y22 -> kqk
x08 XOR y08 -> wcg
y37 XOR x37 -> mfc
wrn XOR fww -> z18
rvw OR rsm -> dnb
x23 AND y23 -> mcw
wwc OR hch -> ntr
x22 XOR y22 -> vjk
gqf XOR mfc -> z37
sth AND bhw -> htp
rng XOR mdw -> z24
y04 XOR x04 -> kkt
fsf XOR pvw -> z12
bpg XOR kpk -> z10
x02 AND y02 -> qhg
x19 XOR y19 -> nhr
cbg OR srg -> dwp
pfh XOR gqg -> z44
y00 AND x00 -> wsg
x33 XOR y33 -> qjh
jts XOR hhm -> z17
y32 XOR x32 -> ncw
fww AND wrn -> gfq
qcn OR fjq -> vsk
nsg AND kkt -> dhf
y32 AND x32 -> qdc
bgf OR sfb -> tpd
dnb AND bsv -> bcn
y28 XOR x28 -> phk
tds AND mqr -> kvv
wtf OR qwn -> phm
pss XOR csk -> z09
kwp OR sbk -> vnp
y26 AND x26 -> rvw
mvv AND fvm -> qfj
y15 AND x15 -> hhb
hbb XOR nrv -> z29
dsn AND wcg -> rms
bnr OR rms -> pss
nfn OR cwj -> sth
mvp OR wms -> kqs
khg XOR hdd -> z14
bwd OR rnr -> wjn
x18 AND y18 -> twv
rfs XOR rpk -> z35
dwk AND fbs -> srg
prp OR dmf -> qjs
nbb OR fkk -> hpg
ncw XOR qjs -> z32
pcd OR wff -> hbb
y43 XOR x43 -> jmq
hkg OR mcw -> rng
x09 AND y09 -> hww
y13 AND x13 -> fhs
qfg AND bvc -> bgf
y18 XOR x18 -> wrn
phk XOR rkf -> z28
x06 XOR y06 -> qfg
y00 XOR x00 -> z00
x16 XOR y16 -> tds
hgs AND hhh -> wms
fkc OR vcd -> vpb
y03 AND x03 -> rrr
thc OR rrr -> nsg
sfw XOR gnf -> z13
bvc XOR qfg -> z06
wsg AND pnw -> hch
y39 XOR x39 -> htw
x12 AND y12 -> npc
vjk AND kqs -> shk
ggk XOR hpg -> z36
gjs XOR vsh -> z23
ddj OR ktn -> dsn
x38 XOR y38 -> nbw
y33 AND x33 -> mqv
ggk AND hpg -> bqf
npc OR hsf -> sfw
y16 AND x16 -> wmd
vsh AND gjs -> hkg
x10 XOR y10 -> kpk
mcd OR mqv -> dsf
x05 XOR y05 -> hdc
wcg XOR dsn -> z08
x41 XOR y41 -> nkw
mts AND ntr -> jgj
bcm OR mpd -> fcd
tds XOR mqr -> z16
vsk AND svf -> fkc
x27 XOR y27 -> bsv
bqf OR rhv -> gqf
kbb OR khw -> z45
nrv AND hbb -> kwp
csk AND pss -> fqq
y34 AND x34 -> cjq
x20 AND y20 -> mqg
tsh OR fhs -> hdd
wks AND nhr -> hcq
cjq OR bsh -> rfs
gfq OR twv -> wks
rwd OR rhp -> fbs
y37 AND x37 -> rnr
vfs OR jgd -> cjf
y31 AND x31 -> dmf
kpk AND bpg -> jgd
y36 XOR x36 -> ggk
y42 XOR x42 -> svf
bjs XOR vnp -> z30
cst OR jjk -> gqg
y40 XOR x40 -> bjw
cjf AND ffw -> gqr
fcd AND nkw -> fjq
y01 XOR x01 -> pnw
dnb XOR bsv -> z27
wsg XOR pnw -> z01
y41 AND x41 -> qcn
y06 AND x06 -> sfb
gpb XOR cwn -> z31
x02 XOR y02 -> mts
shd XOR tkd -> z03
dwk XOR fbs -> z25
y11 XOR x11 -> ffw
phk AND rkf -> wff
jmq AND vpb -> cst
bcn OR tts -> rkf
y07 AND x07 -> ktn
x17 AND y17 -> rrk
x10 AND y10 -> vfs
fwn XOR dwp -> z26
x01 AND y01 -> wwc
htw AND wrr -> wtf
y15 XOR x15 -> bhw
+556
View File
@@ -0,0 +1,556 @@
x+y xor result = 11100111000000111100000
-> wrong outputs: ...
5432109876543210987654321098765432109876543210
x + y = 1100001110001111100010001100100000011011100110
result = 1100001110001111100010010000011000011100000110
(... z2 z1 z0)
-> z 5, 6, 7, 8, 15, 16, 17, 20, 21, 22
// z20 (0->1) qfj or mqg
// z21 (0->1) hgs ^ hhh
// z22 (1->0) kqs ^ vjk
z15 (1->0) sth and bhw
z16 (1->0) tds ^ mqr
z17 (0->1) jts ^ hhm
z05 (0->1) y05 and x05 -> mit anderem z Gatter tauschen (z.B. z 8, 15, 16, 22)
z06 (0->1) bvc ^ qfg
z07 (0->1) cwh ^ tpd (cwh 1->0)
// z08 (1->0) wcg ^ dsn
----
SWAP:
qfg and mvv (z06, z07, z08, z20, z21, z22)
z05 and z15
z16 and z17
WORKS ON ONE EXAMPLE
----
z06 (0->1) (dkr or fdd) ^ 1
dkr = gcs ^ hdc = 1
fdd = hdc and gcs = 0
hdc = 0, gcs = 1
gcs = dhf or hrr = 1 -> 0
dhf nsg and kkt
1
hrr x04 and y04
0
z07 (0->1) 1 ^ (bgf or sfb)
bgf = qfg and bvc = 1 -> 0
sfb = 0
// 2 gates: qfg = 1 -> 0
z08 (1->0) 0 ^ (ddj or ktn -> 0)
ddj = cwh and tpd = 1 -> 0
ktn = 0
z15 (1->0) (nfn or cwj) and 1
nfn = khg and hdd = 1 -> 0
cwj = 0 -> 0
z16 (1->0) 1 ^ (hhb or htp -> 1)
hhb = 0
htp = bhw ^ sth = 0 -> 1
bhw = 1
sth = nfn or cwj = 1 -> 0
// sth 1->0 : z16 and z15
z17 (0->1) (wmd or kvv -> 1) ^ 0
wmd y16 and x16
kvv = tds and mqr = 0
z20 (0->1) (mvv and fvm -> 1) or 0
z21 (0->1) 1 ^ (mvv ^ fvm -> 0)
fvm = hcq or pjv = 1
// 2 gates: mvv = 0 -> 1
-> z22 (1->0) (mvp or wms) ^ 0
wms = hgs and hhh = 1 -> 0
hgs y21 ^ x21
mvp = x21 and y21
hhh mvv ^ fvm
mvv x20 ^ y20
fvm = hcq or pjv = 1
1
hhh <> wms ?
----
z01
z01 wsg ^ pnw =1
wsg y00 and x00 = 1
pnw y01 ^ x01 = 0
z02
z02 mts ^ ntr = 1
mts x02 ^ y02 = 1
ntr wwc or hch = 0
wwc x01 and y01 = 0
hch wsg and pnw
____
z06 (((((((1 ^ 1) and ((1 and 0) or ((1 ^ 0) and ((0 and 0) or ((1 and 1) and (0 ^ 0)))))) or (1 and 1)) and (1 ^ 0)) or (0 and 1)) ^ (0 ^ 0)) or ((0 ^ 0) and (((((1 ^ 1) and ((1 and 0) or ((1 ^ 0) and ((0 and 0) or ((1 and 1) and (0 ^ 0)))))) or (1 and 1)) and (1 ^ 0)) or (0 and 1)))) ^ 1
z07 1 ^ (((1 ^ 0) and (((((((1 ^ 1) and ((1 and 0) or ((1 ^ 0) and ((0 and 0) or ((1 and 1) and (0 ^ 0)))))) or (1 and 1)) and (1 ^ 0)) or (0 and 1)) ^ (0 ^ 0)) or ((0 ^ 0) and (((((1 ^ 1) and ((1 and 0) or ((1 ^ 0) and ((0 and 0) or ((1 and 1) and (0 ^ 0)))))) or (1 and 1)) and (1 ^ 0)) or (0 and 1))))) or (0 and 1))
z08 (0 ^ 0) ^ (((1 ^ 0) and (((1 ^ 0) and (((((((1 ^ 1) and ((1 and 0) or ((1 ^ 0) and ((0 and 0) or ((1 and 1) and (0 ^ 0)))))) or (1 and 1)) and (1 ^ 0)) or (0 and 1)) ^ (0 ^ 0)) or ((0 ^ 0) and (((((1 ^ 1) and ((1 and 0) or ((1 ^ 0) and ((0 and 0) or ((1 and 1) and (0 ^ 0)))))) or (1 and 1)) and (1 ^ 0)) or (0 and 1))))) or (0 and 1))) or (0 and 1))
z15 (((1 ^ 0) and ((((1 and 0) or (((((1 and 0) or ((1 ^ 0) and (((1 ^ 0) and ((0 and 0) or ((((1 ^ 0) and (((1 ^ 0) and (((((((1 ^ 1) and ((1 and 0) or ((1 ^ 0) and ((0 and 0) or ((1 and 1) and (0 ^ 0)))))) or (1 and 1)) and (1 ^ 0)) or (0 and 1)) ^ (0 ^ 0)) or ((0 ^ 0) and (((((1 ^ 1) and ((1 and 0) or ((1 ^ 0) and ((0 and 0) or ((1 and 1) and (0 ^ 0)))))) or (1 and 1)) and (1 ^ 0)) or (0 and 1))))) or (0 and 1))) or (0 and 1)) and (0 ^ 0)))) or (1 and 0)))) and (1 ^ 1)) or (1 and 1)) and (0 ^ 1))) and (0 ^ 1)) or (1 and 0))) or (0 and 1)) and 1
z16 1 ^ ((0 and 1) or ((0 ^ 1) ^ (((1 ^ 0) and ((((1 and 0) or (((((1 and 0) or ((1 ^ 0) and (((1 ^ 0) and ((0 and 0) or ((((1 ^ 0) and (((1 ^ 0) and (((((((1 ^ 1) and ((1 and 0) or ((1 ^ 0) and ((0 and 0) or ((1 and 1) and (0 ^ 0)))))) or (1 and 1)) and (1 ^ 0)) or (0 and 1)) ^ (0 ^ 0)) or ((0 ^ 0) and (((((1 ^ 1) and ((1 and 0) or ((1 ^ 0) and ((0 and 0) or ((1 and 1) and (0 ^ 0)))))) or (1 and 1)) and (1 ^ 0)) or (0 and 1))))) or (0 and 1))) or (0 and 1)) and (0 ^ 0)))) or (1 and 0)))) and (1 ^ 1)) or (1 and 1)) and (0 ^ 1))) and (0 ^ 1)) or (1 and 0))) or (0 and 1))))
z17 ((1 and 0) or ((0 ^ 1) and ((0 and 1) or ((0 ^ 1) ^ (((1 ^ 0) and ((((1 and 0) or (((((1 and 0) or ((1 ^ 0) and (((1 ^ 0) and ((0 and 0) or ((((1 ^ 0) and (((1 ^ 0) and (((((((1 ^ 1) and ((1 and 0) or ((1 ^ 0) and ((0 and 0) or ((1 and 1) and (0 ^ 0)))))) or (1 and 1)) and (1 ^ 0)) or (0 and 1)) ^ (0 ^ 0)) or ((0 ^ 0) and (((((1 ^ 1) and ((1 and 0) or ((1 ^ 0) and ((0 and 0) or ((1 and 1) and (0 ^ 0)))))) or (1 and 1)) and (1 ^ 0)) or (0 and 1))))) or (0 and 1))) or (0 and 1)) and (0 ^ 0)))) or (1 and 0)))) and (1 ^ 1)) or (1 and 1)) and (0 ^ 1))) and (0 ^ 1)) or (1 and 0))) or (0 and 1)))))) ^ 0
z20 ((0 ^ 0) and (((((((0 ^ 0) and ((1 and 0) or ((0 ^ 1) and ((0 and 1) or ((0 ^ 1) ^ (((1 ^ 0) and ((((1 and 0) or (((((1 and 0) or ((1 ^ 0) and (((1 ^ 0) and ((0 and 0) or ((((1 ^ 0) and (((1 ^ 0) and (((((((1 ^ 1) and ((1 and 0) or ((1 ^ 0) and ((0 and 0) or ((1 and 1) and (0 ^ 0)))))) or (1 and 1)) and (1 ^ 0)) or (0 and 1)) ^ (0 ^ 0)) or ((0 ^ 0) and (((((1 ^ 1) and ((1 and 0) or ((1 ^ 0) and ((0 and 0) or ((1 and 1) and (0 ^ 0)))))) or (1 and 1)) and (1 ^ 0)) or (0 and 1))))) or (0 and 1))) or (0 and 1)) and (0 ^ 0)))) or (1 and 0)))) and (1 ^ 1)) or (1 and 1)) and (0 ^ 1))) and (0 ^ 1)) or (1 and 0))) or (0 and 1))))))) or (0 and 0)) and (1 ^ 1)) or (1 and 1)) and (1 ^ 0)) or (0 and 1))) or 0
z21 (1) ^ ((0 ^ 0) ^ (((((((0 ^ 0) and ((1 and 0) or ((0 ^ 1) and ((0 and 1) or ((0 ^ 1) ^ (((1 ^ 0) and ((((1 and 0) or (((((1 and 0) or ((1 ^ 0) and (((1 ^ 0) and ((0 and 0) or ((((1 ^ 0) and (((1 ^ 0) and (((((((1 ^ 1) and ((1 and 0) or ((1 ^ 0) and ((0 and 0) or ((1 and 1) and (0 ^ 0)))))) or (1 and 1)) and (1 ^ 0)) or (0 and 1)) ^ (0 ^ 0)) or ((0 ^ 0) and (((((1 ^ 1) and ((1 and 0) or ((1 ^ 0) and ((0 and 0) or ((1 and 1) and (0 ^ 0)))))) or (1 and 1)) and (1 ^ 0)) or (0 and 1))))) or (0 and 1))) or (0 and 1)) and (0 ^ 0)))) or (1 and 0)))) and (1 ^ 1)) or (1 and 1)) and (0 ^ 1))) and (0 ^ 1)) or (1 and 0))) or (0 and 1))))))) or (0 and 0)) and (1 ^ 1)) or (1 and 1)) and (1 ^ 0)) or (0 and 1)))
z22 ((1 and 0) or ((0 ^ 1) and ((0 ^ 0) ^ (((((((0 ^ 0) and ((1 and 0) or ((0 ^ 1) and ((0 and 1) or ((0 ^ 1) ^ (((1 ^ 0) and ((((1 and 0) or (((((1 and 0) or ((1 ^ 0) and (((1 ^ 0) and ((0 and 0) or ((((1 ^ 0) and (((1 ^ 0) and (((((((1 ^ 1) and ((1 and 0) or ((1 ^ 0) and ((0 and 0) or ((1 and 1) and (0 ^ 0)))))) or (1 and 1)) and (1 ^ 0)) or (0 and 1)) ^ (0 ^ 0)) or ((0 ^ 0) and (((((1 ^ 1) and ((1 and 0) or ((1 ^ 0) and ((0 and 0) or ((1 and 1) and (0 ^ 0)))))) or (1 and 1)) and (1 ^ 0)) or (0 and 1))))) or (0 and 1))) or (0 and 1)) and (0 ^ 0)))) or (1 and 0)))) and (1 ^ 1)) or (1 and 1)) and (0 ^ 1))) and (0 ^ 1)) or (1 and 0))) or (0 and 1))))))) or (0 and 0)) and (1 ^ 1)) or (1 and 1)) and (1 ^ 0)) or (0 and 1))))) ^ (0)
cwj x14 and y14
0
gcs dhf or hrr
1
pfh y44 ^ x44
0
bpg fqq or hww
0
jts wmd or kvv
0
nfn khg and hdd
1
rpk y35 ^ x35
0
htp bhw ^ sth
0
gnf x13 ^ y13
1
qwn y39 and x39
0
z19 nhr ^ wks
0
mpd x40 and y40
0
hsf pvw and fsf
1
sbk y29 and x29
1
gjs kqk or shk
1
fww swm or rrk
0
bpn x30 and y30
0
z02 mts ^ ntr
1
vsh y23 ^ x23
1
cwh x07 ^ y07
1
wrr jqq or trc
0
khg y14 ^ x14
1
fsf y12 ^ x12
1
tts x27 and y27
0
tsp bjs and vnp
0
fvm hcq or pjv
1
z42 vsk ^ svf
0
rsm dwp and fwn
0
bjs x30 ^ y30
0
pjv y19 and x19
0
mvv x20 ^ y20
0
z43 vpb ^ jmq
0
thc tkd and shd
0
z38 nbw ^ wjn
1
jqq wjn and nbw
0
hhm y17 ^ x17
0
bvc dkr or fdd
1
mcd qjh and qcm
0
fwn x26 ^ y26
0
bsh dsf and tjv
0
nhw qjs and ncw
0
z04 nsg ^ kkt
0
mqr hhb or htp
0
z21 hgs ^ hhh
0
z39 wrr ^ htw
1
z07 cwh ^ tpd
0
dkr gcs ^ hdc
1
rhp rng and mdw
1
ddj cwh and tpd
1
jjk x43 and y43
1
swm hhm and jts
0
hrr x04 and y04
0
shd qhg or jgj
0
kbb y44 and x44
1
prp gpb and cwn
0
vcd y42 and x42
0
trc y38 and x38
0
hhh mvv ^ fvm
1
z33 qjh ^ qcm
1
z05 y05 and x05
0
khw pfh and gqg
0
tkd y03 ^ x03
0
dwk x25 ^ y25
0
bcm phm and bjw
0
gpb y31 ^ x31
1
pcd y28 and x28
0
fdd hdc and gcs
0
z11 ffw ^ cjf
0
hgs y21 ^ x21
1
z41 fcd ^ nkw
0
z22 kqs ^ vjk
1
ggk x36 and y36
0
tjv x34 ^ y34
0
cbg y25 and x25
0
mdw x24 ^ y24
1
fkk rpk and rfs
0
rwd x24 and y24
0
mdb y11 and x11
1
z40 phm ^ bjw
0
cwn tsp or bpn
0
nrv y29 ^ x29
0
qcm nhw or qdc
0
z34 tjv ^ dsf
0
mvp x21 and y21
0
bnr x08 and y08
0
pvw gqr or mdb
1
tsh sfw and gnf
1
bwd mfc and gqf
0
nbb y35 and x35
0
csk x09 ^ y09
1
z20 qfj or mqg
0
kqk x22 and y22
1
wcg x08 ^ y08
0
mfc y37 ^ x37
1
z18 wrn ^ fww
0
dnb rvw or rsm
1
mcw x23 and y23
0
ntr wwc or hch
0
vjk x22 ^ y22
0
z37 gqf ^ mfc
1
z15 sth and bhw
1
z24 rng ^ mdw
0
kkt y04 ^ x04
1
z12 fsf ^ pvw
0
z10 bpg ^ kpk
1
qhg x02 and y02
0
nhr x19 ^ y19
1
dwp cbg or srg
0
z44 pfh ^ gqg
1
wsg y00 and x00
1
qjh x33 ^ y33
1
z17 jts ^ hhm
0
ncw y32 ^ x32
1
gfq fww and wrn
0
vsk qcn or fjq
0
dhf nsg and kkt
1
qdc y32 and x32
0
tpd bgf or sfb
1
bcn dnb and bsv
1
phk y28 ^ x28
1
kvv tds and mqr
0
phm wtf or qwn
0
z09 pss ^ csk
1
vnp kwp or sbk
1
rvw y26 and x26
1
qfj mvv and fvm
0
hhb y15 and x15
0
z29 hbb ^ nrv
1
rms dsn and wcg
0
pss bnr or rms
0
sth nfn or cwj
1
kqs mvp or wms
1
z14 khg ^ hdd
0
wjn bwd or rnr
0
twv x18 and y18
1
z35 rfs ^ rpk
0
srg dwk and fbs
0
qjs prp or dmf
0
hpg nbb or fkk
0
z32 ncw ^ qjs
1
hbb pcd or wff
1
jmq y43 ^ x43
0
rng hkg or mcw
1
hww x09 and y09
0
fhs y13 and x13
0
bgf qfg and bvc
1
wrn y18 ^ x18
0
z28 phk ^ rkf
0
qfg x06 ^ y06
1
z00 y00 ^ x00
0
tds x16 ^ y16
1
wms hgs and hhh
1
vpb fkc or vcd
0
rrr y03 and x03
1
nsg thc or rrr
1
z13 sfw ^ gnf
0
z06 bvc ^ qfg
0
hch wsg and pnw
0
htw y39 ^ x39
1
npc x12 and y12
0
shk vjk and kqs
0
z36 ggk ^ hpg
0
z23 gjs ^ vsh
0
dsn ddj or ktn
1
nbw x38 ^ y38
1
mqv y33 and x33
0
bqf ggk and hpg
0
sfw npc or hsf
1
wmd y16 and x16
0
hkg vsh and gjs
1
kpk x10 ^ y10
1
dsf mcd or mqv
0
hdc x05 ^ y05
0
z08 wcg ^ dsn
1
nkw x41 ^ y41
0
jgj mts and ntr
0
fcd bcm or mpd
0
z16 tds ^ mqr
1
fkc vsk and svf
0
bsv x27 ^ y27
1
gqf bqf or rhv
0
z45 kbb or khw
1
kwp nrv and hbb
0
fqq csk and pss
0
cjq y34 and x34
0
mqg x20 and y20
0
hdd tsh or fhs
1
hcq wks and nhr
1
rfs cjq or bsh
0
wks gfq or twv
1
fbs rwd or rhp
1
rnr y37 and x37
0
cjf vfs or jgd
0
dmf y31 and x31
0
jgd kpk and bpg
0
rhv y36 ^ x36
0
svf y42 ^ x42
0
z30 bjs ^ vnp
1
gqg cst or jjk
1
bjw y40 ^ x40
0
gqr cjf and ffw
0
fjq fcd and nkw
0
pnw y01 ^ x01
0
z27 dnb ^ bsv
0
z01 wsg ^ pnw
1
qcn y41 and x41
0
sfb y06 and x06
0
z31 gpb ^ cwn
1
mts x02 ^ y02
1
z03 shd ^ tkd
0
z25 dwk ^ fbs
1
ffw y11 ^ x11
0
wff phk and rkf
1
cst jmq and vpb
0
rkf bcn or tts
1
ktn y07 and x07
0
rrk x17 and y17
0
vfs x10 and y10
0
z26 fwn ^ dwp
0
wwc x01 and y01
0
wtf htw and wrr
0
bhw y15 ^ x15
1
+222
View File
@@ -0,0 +1,222 @@
bcm (((y39 ^ x39) and (((((y37 ^ x37) and (((x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))) or (y36 ^ x36))) or (y37 and x37)) and (x38 ^ y38)) or (y38 and x38))) or (y39 and x39)) and (y40 ^ x40)
bcn ((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)
bgf (x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))
bhw y15 ^ x15
bjs x30 ^ y30
bjw y40 ^ x40
bnr x08 and y08
bpg ((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)
bpn x30 and y30
bqf (x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))
bsh (((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)
bsv x27 ^ y27
bvc ((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)))
bwd (y37 ^ x37) and (((x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))) or (y36 ^ x36))
cbg y25 and x25
cjf (x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))
cjq y34 and x34
csk x09 ^ y09
cst (y43 ^ x43) and ((((y41 and x41) or ((((((y39 ^ x39) and (((((y37 ^ x37) and (((x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))) or (y36 ^ x36))) or (y37 and x37)) and (x38 ^ y38)) or (y38 and x38))) or (y39 and x39)) and (y40 ^ x40)) or (x40 and y40)) and (x41 ^ y41))) and (y42 ^ x42)) or (y42 and x42))
cwh x07 ^ y07
cwj x14 and y14
cwn ((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30)
ddj (x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))
dhf (((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)
dkr (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)
dmf y31 and x31
dnb (y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))
dsf ((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)
dsn ((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)
dwk x25 ^ y25
dwp (y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))
fbs (x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))
fcd ((((y39 ^ x39) and (((((y37 ^ x37) and (((x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))) or (y36 ^ x36))) or (y37 and x37)) and (x38 ^ y38)) or (y38 and x38))) or (y39 and x39)) and (y40 ^ x40)) or (x40 and y40)
fdd (x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))
ffw y11 ^ x11
fhs y13 and x13
fjq (((((y39 ^ x39) and (((((y37 ^ x37) and (((x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))) or (y36 ^ x36))) or (y37 and x37)) and (x38 ^ y38)) or (y38 and x38))) or (y39 and x39)) and (y40 ^ x40)) or (x40 and y40)) and (x41 ^ y41)
fkc ((y41 and x41) or ((((((y39 ^ x39) and (((((y37 ^ x37) and (((x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))) or (y36 ^ x36))) or (y37 and x37)) and (x38 ^ y38)) or (y38 and x38))) or (y39 and x39)) and (y40 ^ x40)) or (x40 and y40)) and (x41 ^ y41))) and (y42 ^ x42)
fkk (y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))
fqq (x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))
fsf y12 ^ x12
fvm ((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)
fwn x26 ^ y26
fww ((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)
gcs ((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)
gfq (((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)
ggk x36 and y36
gjs (x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19))))))
gnf x13 ^ y13
gpb y31 ^ x31
gqf ((x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))) or (y36 ^ x36)
gqg ((y43 ^ x43) and ((((y41 and x41) or ((((((y39 ^ x39) and (((((y37 ^ x37) and (((x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))) or (y36 ^ x36))) or (y37 and x37)) and (x38 ^ y38)) or (y38 and x38))) or (y39 and x39)) and (y40 ^ x40)) or (x40 and y40)) and (x41 ^ y41))) and (y42 ^ x42)) or (y42 and x42))) or (x43 and y43)
gqr ((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)
hbb (y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27)))
hch (y00 and x00) and (y01 ^ x01)
hcq (((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)
hdc x05 ^ y05
hdd (((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13)
hgs y21 ^ x21
hhb y15 and x15
hhh (x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19))
hhm y17 ^ x17
hkg (y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))
hpg (y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34))))
hrr x04 and y04
hsf ((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12)
htp (y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))
htw y39 ^ x39
hww x09 and y09
jgd (x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09))
jgj (x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))
jjk x43 and y43
jmq y43 ^ x43
jqq (((y37 ^ x37) and (((x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))) or (y36 ^ x36))) or (y37 and x37)) and (x38 ^ y38)
jts (y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14)))))
kbb y44 and x44
khg y14 ^ x14
khw (y44 ^ x44) and (((y43 ^ x43) and ((((y41 and x41) or ((((((y39 ^ x39) and (((((y37 ^ x37) and (((x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))) or (y36 ^ x36))) or (y37 and x37)) and (x38 ^ y38)) or (y38 and x38))) or (y39 and x39)) and (y40 ^ x40)) or (x40 and y40)) and (x41 ^ y41))) and (y42 ^ x42)) or (y42 and x42))) or (x43 and y43))
kkt y04 ^ x04
kpk x10 ^ y10
kqk x22 and y22
kqs (x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19))))
ktn y07 and x07
kvv (x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))
kwp (y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))
mcd (x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))
mcw x23 and y23
mdb y11 and x11
mdw x24 ^ y24
mfc y37 ^ x37
mpd x40 and y40
mqg x20 and y20
mqr (y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14)))
mqv y33 and x33
mts x02 ^ y02
mvp x21 and y21
mvv x20 ^ y20
nbb y35 and x35
nbw x38 ^ y38
ncw y32 ^ x32
nfn (y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))
nhr x19 ^ y19
nhw (((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)
nkw x41 ^ y41
npc x12 and y12
nrv y29 ^ x29
nsg ((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)
ntr (x01 and y01) or ((y00 and x00) and (y01 ^ x01))
pcd y28 and x28
pfh y44 ^ x44
phk y28 ^ x28
phm ((y39 ^ x39) and (((((y37 ^ x37) and (((x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))) or (y36 ^ x36))) or (y37 and x37)) and (x38 ^ y38)) or (y38 and x38))) or (y39 and x39)
pjv y19 and x19
pnw y01 ^ x01
prp (y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))
pss (x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08))
pvw (((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)
qcm ((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32)
qcn y41 and x41
qdc y32 and x32
qfg x06 ^ y06
qfj (x20 ^ y20) and (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19))
qhg x02 and y02
qjh x33 ^ y33
qjs ((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)
qwn y39 and x39
rfs (y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34))
rhp (((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24)
rhv y36 ^ x36
rkf (((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27)
rms (((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)
rng ((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)
rnr y37 and x37
rpk y35 ^ x35
rrk x17 and y17
rrr y03 and x03
rsm ((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26)
rvw y26 and x26
rwd x24 and y24
sbk y29 and x29
sfb y06 and x06
sfw (x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))
shd (x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01))))
shk (x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))
srg (x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24)))
sth ((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14)
svf y42 ^ x42
swm (y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))
tds x16 ^ y16
thc (y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))
tjv x34 ^ y34
tkd y03 ^ x03
tpd ((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06)
trc y38 and x38
tsh ((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)
tsp (x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))
tts x27 and y27
twv x18 and y18
vcd y42 and x42
vfs x10 and y10
vjk x22 ^ y22
vnp ((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29)
vpb (((y41 and x41) or ((((((y39 ^ x39) and (((((y37 ^ x37) and (((x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))) or (y36 ^ x36))) or (y37 and x37)) and (x38 ^ y38)) or (y38 and x38))) or (y39 and x39)) and (y40 ^ x40)) or (x40 and y40)) and (x41 ^ y41))) and (y42 ^ x42)) or (y42 and x42)
vsh y23 ^ x23
vsk (y41 and x41) or ((((((y39 ^ x39) and (((((y37 ^ x37) and (((x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))) or (y36 ^ x36))) or (y37 and x37)) and (x38 ^ y38)) or (y38 and x38))) or (y39 and x39)) and (y40 ^ x40)) or (x40 and y40)) and (x41 ^ y41))
wcg x08 ^ y08
wff (y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))
wjn ((y37 ^ x37) and (((x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))) or (y36 ^ x36))) or (y37 and x37)
wks ((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)
wmd y16 and x16
wms (y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))
wrn y18 ^ x18
wrr ((((y37 ^ x37) and (((x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))) or (y36 ^ x36))) or (y37 and x37)) and (x38 ^ y38)) or (y38 and x38)
wsg y00 and x00
wtf (y39 ^ x39) and (((((y37 ^ x37) and (((x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))) or (y36 ^ x36))) or (y37 and x37)) and (x38 ^ y38)) or (y38 and x38))
wwc x01 and y01
z00 y00 ^ x00
z01 (y00 and x00) ^ (y01 ^ x01)
z02 (x02 ^ y02) ^ ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))
z03 ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01))))) ^ (y03 ^ x03)
z04 (((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) ^ (y04 ^ x04)
z05 y05 and x05
z06 (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)))) ^ (x06 ^ y06)
z07 (x07 ^ y07) ^ (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))
z08 (x08 ^ y08) ^ (((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07))
z09 ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08))) ^ (x09 ^ y09)
z10 (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)) ^ (x10 ^ y10)
z11 (y11 ^ x11) ^ ((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09))))
z12 (y12 ^ x12) ^ ((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11))
z13 ((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) ^ (x13 ^ y13)
z14 (y14 ^ x14) ^ ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))
z15 (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14)) and (y15 ^ x15)
z16 (x16 ^ y16) ^ ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))
z17 ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14)))))) ^ (y17 ^ x17)
z18 (y18 ^ x18) ^ (((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17))
z19 (x19 ^ y19) ^ (((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18))
z20 ((x20 ^ y20) and (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19))) or (x20 and y20)
z21 (y21 ^ x21) ^ ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))
z22 ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19))))) ^ (x22 ^ y22)
z23 ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19))))))) ^ (y23 ^ x23)
z24 (((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) ^ (x24 ^ y24)
z25 (x25 ^ y25) ^ ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24)))
z26 (x26 ^ y26) ^ ((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24)))))
z27 ((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) ^ (x27 ^ y27)
z28 (y28 ^ x28) ^ ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))
z29 ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27)))) ^ (y29 ^ x29)
z30 (x30 ^ y30) ^ (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))
z31 (y31 ^ x31) ^ (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))
z32 (y32 ^ x32) ^ (((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31))
z33 (x33 ^ y33) ^ (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))
z34 (x34 ^ y34) ^ (((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33))
z35 ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34))) ^ (y35 ^ x35)
z36 (x36 and y36) ^ ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))
z37 (((x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))) or (y36 ^ x36)) ^ (y37 ^ x37)
z38 (x38 ^ y38) ^ (((y37 ^ x37) and (((x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))) or (y36 ^ x36))) or (y37 and x37))
z39 (((((y37 ^ x37) and (((x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))) or (y36 ^ x36))) or (y37 and x37)) and (x38 ^ y38)) or (y38 and x38)) ^ (y39 ^ x39)
z40 (((y39 ^ x39) and (((((y37 ^ x37) and (((x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))) or (y36 ^ x36))) or (y37 and x37)) and (x38 ^ y38)) or (y38 and x38))) or (y39 and x39)) ^ (y40 ^ x40)
z41 (((((y39 ^ x39) and (((((y37 ^ x37) and (((x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))) or (y36 ^ x36))) or (y37 and x37)) and (x38 ^ y38)) or (y38 and x38))) or (y39 and x39)) and (y40 ^ x40)) or (x40 and y40)) ^ (x41 ^ y41)
z42 ((y41 and x41) or ((((((y39 ^ x39) and (((((y37 ^ x37) and (((x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))) or (y36 ^ x36))) or (y37 and x37)) and (x38 ^ y38)) or (y38 and x38))) or (y39 and x39)) and (y40 ^ x40)) or (x40 and y40)) and (x41 ^ y41))) ^ (y42 ^ x42)
z43 ((((y41 and x41) or ((((((y39 ^ x39) and (((((y37 ^ x37) and (((x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))) or (y36 ^ x36))) or (y37 and x37)) and (x38 ^ y38)) or (y38 and x38))) or (y39 and x39)) and (y40 ^ x40)) or (x40 and y40)) and (x41 ^ y41))) and (y42 ^ x42)) or (y42 and x42)) ^ (y43 ^ x43)
z44 (y44 ^ x44) ^ (((y43 ^ x43) and ((((y41 and x41) or ((((((y39 ^ x39) and (((((y37 ^ x37) and (((x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))) or (y36 ^ x36))) or (y37 and x37)) and (x38 ^ y38)) or (y38 and x38))) or (y39 and x39)) and (y40 ^ x40)) or (x40 and y40)) and (x41 ^ y41))) and (y42 ^ x42)) or (y42 and x42))) or (x43 and y43))
z45 (y44 and x44) or ((y44 ^ x44) and (((y43 ^ x43) and ((((y41 and x41) or ((((((y39 ^ x39) and (((((y37 ^ x37) and (((x36 and y36) and ((y35 and x35) or ((y35 ^ x35) and ((y34 and x34) or ((((x33 ^ y33) and (((((y31 ^ x31) and (((x30 ^ y30) and (((y29 ^ x29) and ((y28 and x28) or ((y28 ^ x28) and ((((y26 and x26) or (((y25 and x25) or ((x25 ^ y25) and ((x24 and y24) or ((((y23 ^ x23) and ((x22 and y22) or ((x22 ^ y22) and ((x21 and y21) or ((y21 ^ x21) and ((x20 ^ y20) ^ (((((((y17 ^ x17) and ((y16 and x16) or ((x16 ^ y16) and ((y15 and x15) or ((y15 ^ x15) ^ (((y14 ^ x14) and ((((x12 and y12) or (((((x10 and y10) or ((x10 ^ y10) and (((x09 ^ y09) and ((x08 and y08) or ((((x07 ^ y07) and (((x06 ^ y06) and (((((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04)) ^ (x05 ^ y05)) or ((x05 ^ y05) and (((((y03 ^ x03) and ((x02 and y02) or ((x02 ^ y02) and ((x01 and y01) or ((y00 and x00) and (y01 ^ x01)))))) or (y03 and x03)) and (y04 ^ x04)) or (x04 and y04))))) or (y06 and x06))) or (y07 and x07)) and (x08 ^ y08)))) or (x09 and y09)))) and (y11 ^ x11)) or (y11 and x11)) and (y12 ^ x12))) and (x13 ^ y13)) or (y13 and x13))) or (x14 and y14))))))) or (x17 and y17)) and (y18 ^ x18)) or (x18 and y18)) and (x19 ^ y19)) or (y19 and x19)))))))) or (x23 and y23)) and (x24 ^ y24))))) and (x26 ^ y26))) and (x27 ^ y27)) or (x27 and y27))))) or (y29 and x29))) or (x30 and y30))) or (y31 and x31)) and (y32 ^ x32)) or (y32 and x32))) or (y33 and x33)) and (x34 ^ y34)))))) or (y36 ^ x36))) or (y37 and x37)) and (x38 ^ y38)) or (y38 and x38))) or (y39 and x39)) and (y40 ^ x40)) or (x40 and y40)) and (x41 ^ y41))) and (y42 ^ x42)) or (y42 and x42))) or (x43 and y43)))
+140
View File
@@ -0,0 +1,140 @@
--- Day 25: Code Chronicle ---
Out of ideas and time, The Historians agree that they should go back to check the Chief Historian's office one last time, just in case he went back there without you noticing.
When you get there, you are surprised to discover that the door to his office is locked! You can hear someone inside, but knocking yields no response. The locks on this floor are all fancy, expensive, virtual versions of five-pin tumbler locks, so you contact North Pole security to see if they can help open the door.
Unfortunately, they've lost track of which locks are installed and which keys go with them, so the best they can do is send over schematics of every lock and every key for the floor you're on (your puzzle input).
The schematics are in a cryptic file format, but they do contain manufacturer information, so you look up their support number.
"Our Virtual Five-Pin Tumbler product? That's our most expensive model! Way more secure than--" You explain that you need to open a door and don't have a lot of time.
"Well, you can't know whether a key opens a lock without actually trying the key in the lock (due to quantum hidden variables), but you can rule out some of the key/lock combinations."
"The virtual system is complicated, but part of it really is a crude simulation of a five-pin tumbler lock, mostly for marketing reasons. If you look at the schematics, you can figure out whether a key could possibly fit in a lock."
He transmits you some example schematics:
#####
.####
.####
.####
.#.#.
.#...
.....
#####
##.##
.#.##
...##
...#.
...#.
.....
.....
#....
#....
#...#
#.#.#
#.###
#####
.....
.....
#.#..
###..
###.#
###.#
#####
.....
.....
.....
#....
#.#..
#.#.#
#####
"The locks are schematics that have the top row filled (#) and the bottom row empty (.); the keys have the top row empty and the bottom row filled. If you look closely, you'll see that each schematic is actually a set of columns of various heights, either extending downward from the top (for locks) or upward from the bottom (for keys)."
"For locks, those are the pins themselves; you can convert the pins in schematics to a list of heights, one per column. For keys, the columns make up the shape of the key where it aligns with pins; those can also be converted to a list of heights."
"So, you could say the first lock has pin heights 0,5,3,4,3:"
#####
.####
.####
.####
.#.#.
.#...
.....
"Or, that the first key has heights 5,0,2,1,3:"
.....
#....
#....
#...#
#.#.#
#.###
#####
"These seem like they should fit together; in the first four columns, the pins and key don't overlap. However, this key cannot be for this lock: in the rightmost column, the lock's pin overlaps with the key, which you know because in that column the sum of the lock height and key height is more than the available space."
"So anyway, you can narrow down the keys you'd need to try by just testing each key with each lock, which means you would have to check... wait, you have how many locks? But the only installation that size is at the North--" You disconnect the call.
In this example, converting both locks to pin heights produces:
0,5,3,4,3
1,2,0,5,3
Converting all three keys to heights produces:
5,0,2,1,3
4,3,4,0,2
3,0,2,0,1
Then, you can try every key with every lock:
Lock 0,5,3,4,3 and key 5,0,2,1,3: overlap in the last column.
Lock 0,5,3,4,3 and key 4,3,4,0,2: overlap in the second column.
Lock 0,5,3,4,3 and key 3,0,2,0,1: all columns fit!
Lock 1,2,0,5,3 and key 5,0,2,1,3: overlap in the first column.
Lock 1,2,0,5,3 and key 4,3,4,0,2: all columns fit!
Lock 1,2,0,5,3 and key 3,0,2,0,1: all columns fit!
So, in this example, the number of unique lock/key pairs that fit together without overlapping in any column is 3.
Analyze your lock and key schematics. How many unique lock/key pairs fit together without overlapping in any column?
Your puzzle answer was 3360.
The first half of this puzzle is complete! It provides one gold star: *
--- Part Two ---
You and The Historians crowd into the office, startling the Chief Historian awake! The Historians all take turns looking confused until one asks where he's been for the last few months.
"I've been right here, working on this high-priority request from Santa! I think the only time I even stepped away was about a month ago when I went to grab a cup of coffee..."
Just then, the Chief notices the time. "Oh no! I'm going to be late! I must have fallen asleep trying to put the finishing touches on this chronicle Santa requested, but now I don't have enough time to go visit the last 50 places on my list and complete the chronicle before Santa leaves! He said he needed it before tonight's sleigh launch."
One of The Historians holds up the list they've been using this whole time to keep track of where they've been searching. Next to each place you all visited, they checked off that place with a star. Other Historians hold up their own notes they took on the journey; as The Historians, how could they resist writing everything down while visiting all those historically significant places?
The Chief's eyes get wide. "With all this, we might just have enough time to finish the chronicle! Santa said he wanted it wrapped up with a bow, so I'll call down to the wrapping department and... hey, could you bring it up to Santa? I'll need to be in my seat to watch the sleigh launch by then."
You nod, and The Historians quickly work to collect their notes into the final set of pages for the chronicle.
You have enough stars to [Deliver the Chronicle].
Using the notes from the places marked by all fifty stars, The Historians finish the chronicle, wrap it, and give it to you so you can bring it to Santa before the big sleigh launch.
Santa is already in the sleigh making the final launch preparations when you arrive. You try to hand him the chronicle, but he doesn't take it. "Ho ho ho," he laughs to himself. "That gift isn't for me - it's for you. That chronicle is a record of all the places you've been and people you've helped over the last decade. Thank you for everything." With that, Santa takes off in his sleigh to deliver the rest of this year's presents.
(Also, there's a new design up in the [Shop] if you're interested. If you don't see it, give it a few minutes.)
Congratulations! You've finished every puzzle in Advent of Code 2024! I hope you had as much fun solving them as I had making them for you. I'd love to hear about your adventure; you can get in touch with me via contact info on my website or through Bluesky, Mastodon, or Twitter.
If you'd like to see more things like this in the future, please consider supporting Advent of Code and sharing it with others.
I've highlighted the easter eggs in each puzzle, just in case you missed any. Hover your mouse over them, and the easter egg will appear.
+29
View File
@@ -0,0 +1,29 @@
#!/usr/bin/env python3
import sys
import numpy as np
if __name__ == '__main__':
lks = open(sys.argv[1]).read().split('\n\n')
locks, keys = [], []
for l in lks:
ar = [list(x) for x in l.split('\n')]
if l == lks[-1]: ar = ar[0:-1]
if ar[0].count('#') == len(ar[0]):
locks.append(np.array([list(a).count('#') -1 for a in np.transpose(ar)]))
else: keys.append(np.array([list(a).count('#') - 1 for a in np.transpose(ar)]))
# challenge 1
res1 = 0
space = [5] * 5
for key in keys:
for lock in locks:
if sum(key + lock > space) == 0: res1 += 1
print(f"challenge 1:\n{res1}\n")
# challenge 2
res2 = "None :)"
print(f"challenge 2:\n{res2}")
+39
View File
@@ -0,0 +1,39 @@
#####
.####
.####
.####
.#.#.
.#...
.....
#####
##.##
.#.##
...##
...#.
...#.
.....
.....
#....
#....
#...#
#.#.#
#.###
#####
.....
.....
#.#..
###..
###.#
###.#
#####
.....
.....
.....
#....
#.#..
#.#.#
#####
+3999
View File
File diff suppressed because it is too large. Load diff