aboutsummaryrefslogtreecommitdiff
path: root/2020/20
diff options
context:
space:
mode:
authorMarvin Borner2020-12-20 16:12:34 +0100
committerMarvin Borner2020-12-20 16:12:34 +0100
commit144f82f96782c6f0dbd85df836afaca284bec022 (patch)
tree63b223c9e5f6f802ad56f81c12dd7e5cd86a1f05 /2020/20
parent1991d484d2d9960bc075109211c968acbb0655f0 (diff)
OMG I'm so dumb :O
I forgot to apply the reverse function to the other sides...
Diffstat (limited to '2020/20')
-rw-r--r--2020/20/input1792
-rw-r--r--2020/20/solve.c10
2 files changed, 1711 insertions, 91 deletions
diff --git a/2020/20/input b/2020/20/input
index b07aa4b..d2ee427 100644
--- a/2020/20/input
+++ b/2020/20/input
@@ -1,107 +1,1727 @@
-Tile 2311:
-..##.#..#.
-##..#.....
+Tile 3733:
+#.#.#..#.#
+...#..#.##
+.#...#...#
+#.###.....
+..##.....#
+##......#.
+#......#.#
+...#....#.
+###.##...#
+######..##
+
+Tile 3253:
+##..#...##
+#.....#.#.
+....#...##
+#........#
+.......#.#
+##.####...
+..#......#
+...#......
+#.#.....##
+###...###.
+
+Tile 2939:
+####...###
+.#....#..#
+....##....
+..##......
+.#....#...
+#.....#...
+#.....#...
+##........
+......#...
+##.#.#..#.
+
+Tile 3583:
+....#####.
+..#...##.#
+....#.##..
+#.#..#.#..
+..#......#
+......#...
+#...##...#
+#..#...#..
+...#...##.
+..##.###.#
+
+Tile 3761:
+#.##.....#
+##.......#
+..#...#..#
+#.#..#.#..
+#......#.#
+...#...#..
+..##.....#
+#.#..##...
+##.......#
+#...#..##.
+
+Tile 1487:
+...#....##
+#..#....##
+#.......#.
+.#.#..###.
+.......#..
+#....#..##
+...#..#..#
+#......#..
+.###....##
+##.#...##.
+
+Tile 1279:
+..#..##.##
+.........#
+....#.##.#
+....#..#..
+##...#..##
+#......##.
+#.#....###
+.#.....###
+....##.#..
+#.#######.
+
+Tile 1231:
+#.........
+..#...#...
+#...#....#
+#..#.##..#
+..#....#.#
+.##.....#.
+#.#....#.#
+#..#..#...
+#.........
+#...##.#.#
+
+Tile 2837:
+#.###.#...
+#.........
+###.#...#.
+#.#.#.#..#
+.##.......
+#.......##
+......#..#
+###..#....
+#...#.....
+.#..###...
+
+Tile 1447:
+......##.#
+.#..#.....
+#..##.....
+#.........
+.......###
+..........
+..........
+#..##....#
+....#.....
+#.##.####.
+
+Tile 1297:
+...#....##
+#.......#.
+#....##.##
+#..#...#.#
+##...#.#..
+#..#...###
+........#.
+#.....#..#
+.........#
+#.##.#....
+
+Tile 3449:
+........#.
+##..##..##
+.#...#.#..
+#...#....#
+#.....##..
+#.......##
+#.#.#...##
#...##..#.
-####.#...#
-##.##.###.
-##...#.###
-.#.#.#..##
+##.#####.#
+...#..#..#
+
+Tile 1621:
+#...####.#
+#...#.##..
+#........#
+.......#.#
+#..#...#.#
+#....#....
+....#..#.#
+...##...##
+.........#
+.#....##.#
+
+Tile 3187:
+##..##.#..
+##.#..#...
+...#..#.##
+....#....#
+#........#
+....#..##.
+#........#
+#.#...##..
+#..#.#..#.
+#.#..###.#
+
+Tile 1181:
+#..##.#.#.
+....#....#
+#...#....#
+#..#..#..#
+###...###.
+........##
+....#.....
+#..#.....#
+##...#...#
+#.#..#.#..
+
+Tile 3541:
+#.###..#..
+#..###..##
+#...#...#.
+#..###....
+......#..#
+#.........
+#.#...#..#
+##.......#
+..........
+..#...##..
+
+Tile 2591:
+#...#.###.
+.###..##..
+#.......##
+.........#
+#.........
+#####....#
+#..#....#.
+#........#
+...#.#..##
+.##.......
+
+Tile 2789:
+#...#..#..
+##....#.##
+...#......
+..#.#.....
+.........#
+##...#.#..
+.....#.#.#
+#...#....#
+##....#..#
+##..#..#..
+
+Tile 2503:
+#.#.#####.
+.....#.##.
+#.........
+#.........
+..#..#..##
+##....####
+.#.....#..
+..........
+###.......
+..#..#..##
+
+Tile 3617:
+##..####.#
+#..#.##.#.
+....##.##.
+#..###...#
+#.#.#....#
+.#.#....##
+.....##..#
+.......#..
+#...#.#..#
+.##.#..#.#
+
+Tile 1051:
+######...#
+#.#..#..##
+##....##.#
+.......#.#
+...#.....#
+##.......#
+...#......
+.#.###...#
+.......#.#
+.##.###...
+
+Tile 1049:
+.#..##..##
+#...#.....
+...#.#...#
+#.........
+#.........
+..###.....
+#.......#.
+..........
+#......##.
+...###.###
+
+Tile 1973:
+#.###.##..
+....#.####
+....#....#
+##....#...
+..##....##
+#..#......
+##......#.
+#.....#...
+..........
+########.#
+
+Tile 3169:
+.#####.#..
+#........#
+#..#..#..#
+...#....#.
+.#........
+#.#.##..#.
+.#........
+..........
+#....#....
+#......##.
+
+Tile 1217:
+###.#.....
+#.....#...
+..#.##....
+.....#...#
+#.....#..#
+##.#...###
+#.#......#
+...##.#..#
+#....#.#.#
+#.#....###
+
+Tile 1327:
+#####..###
+..##.#.##.
+..#......#
+#......#..
+#..##.#...
+.......###
+#...##...#
..#....#..
-###...#.#.
-..###..###
+.#.......#
+#.....####
-Tile 1951:
-#.##...##.
-#.####...#
-.....#..##
-#...######
-.##.#....#
+Tile 1693:
+.##.###.##
+#...#.....
+...#..#.#.
+..#.......
+#.........
+..#......#
+#.##......
+...#.#...#
+#..#.#...#
+.#.###.##.
+
+Tile 1367:
+.#...#..#.
+...#.#...#
+#........#
+#........#
+..#..##...
+.##.......
+........#.
+#.........
+...#....#.
+#.#..#...#
+
+Tile 1559:
+#.##.#.###
+#.###..#..
+..#..#.##.
+#..#....##
+..#.#..#..
+##.#....##
+#...#.....
+#...#..#.#
+..#.#.##.#
+.###....##
+
+Tile 3727:
+.#..####..
+....##....
+#....#...#
+#.###.#...
+.........#
+#####..#.#
+.####.#.#.
+..#.....##
+#..#..#...
.###.#####
-###.##.##.
-.###....#.
-..#.#..#.#
-#...##.#..
-Tile 1171:
+Tile 3491:
+.###...###
+##.#..##.#
+...#...#.#
+.##.....#.
+.....#.###
+.....#...#
+#.#.....##
+.......#.#
+##.....#..
+###.##..##
+
+Tile 3547:
+#......###
+...#....##
+.#..#...##
+...##.##.#
+#....#...#
+#.#.......
+#..#.#..#.
+###.##....
+......#...
+..#.##.#.#
+
+Tile 2963:
+#####..#.#
+..#...#...
+...##..#..
+...#....##
+###......#
+#.......##
+#.....##..
+#..#...#.#
+.......#.#
+#..#.#...#
+
+Tile 2099:
+###.#####.
+....#.....
+........#.
+..#..#...#
+...#.#.#.#
+#.........
+##...#...#
+.#...###.#
+#...#.#..#
+.........#
+
+Tile 2879:
+#..#.#.##.
+##...#..##
+.....#...#
+#.#.#..#.#
+.#.#..#...
+........#.
+.#..#.#.#.
+#..#.....#
+#.........
+#.#.#.##.#
+
+Tile 1277:
+#..#..##.#
+#..#...###
+.....#..#.
+.....#....
+...#.##..#
+....#....#
+....##...#
+##.##.....
+#......#..
+.#.#...###
+
+Tile 3863:
+#..#..##.#
+#.#.#...##
+...###..##
+.#.#.....#
+..........
+.##.......
+##.#......
+....#....#
+##.#.###.#
+...#..####
+
+Tile 3623:
+....#.###.
+#..##.....
+.....#.#..
+...#...###
+##........
+#.........
+#....#...#
+.#...#...#
+.........#
+..#.#.#.##
+
+Tile 3581:
+#....#...#
+##.###..##
+#...#..#..
+..#.##....
+.#..#....#
+.#.....##.
+#.#...##.#
+#....#.#.#
+...#.....#
+..#......#
+
+Tile 1901:
+..#.#..###
+#.#...#.##
+.#........
+###.#...#.
+.....#....
+.#...#..##
+#...#....#
+##........
+...#...###
+##.#.####.
+
+Tile 1667:
+..#.#.##.#
+#.#.......
+...#.....#
+#..#.....#
+........##
+#.#.#.....
+........#.
+#....#.#..
+.......##.
+#...#.#.#.
+
+Tile 1709:
+#..####.#.
+.##..#...#
+....#....#
+......#..#
+...#.#....
+#......#..
+#.#..#..##
+...###..##
+##......#.
+#.#.##..##
+
+Tile 1307:
+#..#...#.#
+#.#.....##
+#.#......#
+........##
+.....#....
+#........#
+...##...##
+#........#
+#...#.#...
+#..###....
+
+Tile 1997:
+##.......#
+#.#......#
+.......#..
+.....###..
+.##.....#.
+.#..##...#
+.#.#....##
+#....###.#
+#..###..#.
+..###..##.
+
+Tile 3389:
+#.#.#.###.
+.........#
+#.#.#....#
+#.........
+#.#.......
+..#...#..#
+#..#......
+#.........
+#.#....###
+.###.#.###
+
+Tile 2729:
+##.#...#.#
+.....#....
+......#.#.
+#.......#.
+...#...#.#
+..#.......
+#........#
+#........#
+....#.#...
+.#####....
+
+Tile 2467:
+..#.#..###
+.##.#.#...
+#....#...#
+...#.##.##
+...###....
+#..#.....#
+##........
+#...#....#
+##...#..##
+#####.#.#.
+
+Tile 2179:
+###.#...#.
+#......#..
+..#......#
+.......##.
+..##.#.#.#
+....#....#
+.........#
+#..#.....#
+.#..#....#
+###.#..##.
+
+Tile 1879:
+##.####..#
+.......##.
+.........#
+.#.#.....#
+##..##.#..
+#........#
+.#.#..#.##
+#.#.##..#.
+##.#.#....
+.#...#.##.
+
+Tile 1087:
+..###.#.##
+....#.....
+#......###
+........##
+.#......#.
+#.#....#.#
+..........
+###......#
+#.#...##..
+.##.##.#.#
+
+Tile 3331:
+#.###....#
+.....##..#
+....#.#...
+#.#.......
+#........#
+....#.##.#
+#...###..#
+....##....
+#.#.#.#...
+....###.##
+
+Tile 1789:
+##.#.#.###
+##..#..#.#
+..##....#.
+.#....##..
+.....#....
+#........#
+#.......#.
+#........#
+#.....##.#
+.###.#....
+
+Tile 1949:
+####..##..
+#....#....
+#.#..#....
+#.#...#...
+..#...#.#.
+.#.#......
+.#....#.##
+#..###...#
+#.#..#....
+..##.##..#
+
+Tile 2311:
+#...##..##
+..#.#.....
+#.........
+#.#.#....#
+.#..#....#
+..........
+....#.....
+..#.#...##
+#..##....#
+###.######
+
+Tile 1091:
+###.#.####
+#..#.###.#
+..........
+#........#
+##.....#..
+.........#
+.....#.#.#
+###..##...
+.......##.
+..#...##..
+
+Tile 3593:
+##...##..#
+.##.#.##.#
+#.#..#..##
+...#......
+.##.#.....
+#.#..#.###
+#.......#.
+........##
+.........#
+#..#.#....
+
+Tile 2137:
+#.#..#...#
+.....#....
+....#....#
+..#.....#.
+#....#..##
+.#....#.##
+........##
+.#.#....##
+..........
+.#.#..#..#
+
+Tile 2251:
+##..##.###
+##.#......
+.#.....###
+.....#.#.#
+##....####
+#.#..##.##
+###.....#.
+.#....#...
+#.........
+#..#...#..
+
+Tile 1021:
+#..####.#.
+##.....#.#
+#.##...#..
+#....#..##
+#........#
+..#.......
+#.....#...
+#........#
+..........
+..####...#
+
+Tile 2543:
+.#..#.###.
+#...#.#..#
+.#...#....
+##..##...#
+#.##.#...#
+.....#....
+..##...###
+#.......#.
+#.#....#..
+..#.#..##.
+
+Tile 2339:
+#.#####.##
+#...#..#.#
+#...#.#...
+#........#
+#.#.......
+....#.#..#
+###...#.##
+#.........
+......#...
+..####..#.
+
+Tile 1697:
+##...#####
+.......##.
+#.#..#.###
+#.#.......
+.#.#....##
+#..####..#
+##....#..#
####...##.
+...#..#...
+.###.....#
+
+Tile 3271:
+##.#.#.##.
+.........#
+...#.#....
+..#......#
+##...#....
+#.#.#..###
+......###.
+#.##...#..
+.#.#.#..##
+.#...###..
+
+Tile 1801:
+##.#.#....
+#......#.#
+#.#...#...
+...###..##
+##....#..#
+.........#
+..##.#..##
+#..#....##
+#.........
+#...#.####
+
+Tile 2389:
+#..#....#.
+#....###.#
+#....#.#..
+......#.##
+.#.#...#..
+.......#.#
+.........#
+#......##.
+.......#.#
+..#..#....
+
+Tile 3793:
+###.##..#.
+#...#...##
+#........#
+#..#......
+....###..#
+#.#.#.#..#
+#.....##..
+##.#......
+....##.#..
+##.#.###.#
+
+Tile 2213:
+.##.#..#..
+.....#....
+..##..####
+#.......#.
+#..#.....#
+#........#
+#...#.#.##
+...#.....#
+.#........
+#....####.
+
+Tile 2593:
+..#.#.....
+##...#...#
+.......#.#
+#......###
+#.....#...
+##....#..#
+#........#
+#....##..#
+....#.....
+#####.#...
+
+Tile 1907:
+##.###....
+#####.....
+......#...
#..##.#..#
-##.#..#.#.
-.###.####.
-..###.####
-.##....##.
-.#...####.
-#.##.####.
-####..#...
+....#...#.
+....#.....
+.#.#......
+....#....#
+......#..#
+##..####.#
+
+Tile 3719:
+#..##.#..#
+#..#.....#
.....##...
+......#.#.
+##..#....#
+#.........
+#.....#...
+......#...
+#...##...#
+.#..##.#.#
-Tile 1427:
-###.##.#..
-.#..#.##..
+Tile 3659:
+#.#.....##
+##.#....#.
+#....#...#
+#......###
+.....###..
+.##.#.#..#
+.#.#.#...#
+.#...#....
+...#.#.#.#
+##.#.#..##
+
+Tile 1303:
+#.##.#..#.
+#.#..#.#.#
+#...#..#..
+#.#....###
+........##
+..#.#..#..
+.....#...#
+#.#..#....
+...####...
+...##..#..
+
+Tile 1607:
+######....
+..##......
+####.#..#.
+.####.##.#
+.........#
+.#.......#
+.#.#..#..#
+###.##...#
+..#..#...#
+.##...#.##
+
+Tile 1109:
+...#.#...#
+........##
+#.....#..#
+##..##..#.
+#.#......#
+#.....#..#
+#...#....#
+.#.......#
+.#.#...#.#
+#...#####.
+
+Tile 3797:
+##...#.#.#
+#..#####.#
+#####...##
+..##......
+..........
+......#.##
+..#..#..#.
+#####.##..
+##......#.
+..##.#.#..
+
+Tile 3923:
+...###..##
+#..##.....
+#.#......#
+.##.##....
+#..#..#..#
+####....#.
+#........#
+...#......
+..##...#.#
+####......
+
+Tile 2609:
+##..###...
+#.........
+###..#...#
+#.##..#.#.
+#...#..#..
+#.#....##.
+#.#...##.#
+###....#.#
+..#....#.#
+....#.##.#
+
+Tile 3391:
+....######
+#...#..#..
+...#.#...#
+#...#..#..
+#..##....#
+.#..#....#
+#.#......#
+.......#.#
+.....#....
+###.#...#.
+
+Tile 1423:
+###....#.#
+..#.......
+##...##...
+..........
+#.#.###.##
+..#....###
+.#......##
+#.#..#.#..
+#....##.#.
+....##...#
+
+Tile 2399:
+..#...#..#
+..#.#...#.
+##.....##.
+#......#..
+....#....#
+#........#
+#......#.#
+...#......
+.......#..
+##...#.###
+
+Tile 1741:
+...#..##..
+...#.....#
+#.#..#...#
+..##...#..
+#........#
+#....#.#.#
+#..##....#
+.#........
+.###...#.#
+....###.#.
+
+Tile 2887:
+#.#.#.#.##
+.#......#.
+#.#..#...#
+#........#
+......#.##
+..#.#....#
+#....#....
+#....#.#..
+###...#...
+####...##.
+
+Tile 2351:
+..####.#..
+....#....#
+#.#.#...##
+.........#
+#.#...##..
+#..#.#..#.
+#.........
+##......#.
+#........#
+#...#....#
+
+Tile 1061:
+.#..###.##
+......##..
+###......#
+#.#...#...
+.....#.###
+#.........
+#....#....
+..........
+#.##.....#
+#####.#..#
+
+Tile 1009:
+..#..##.#.
+.....#...#
+#......#.#
+..#.......
+.#..##...#
+#...#.#..#
+..#.......
+#.....#..#
+....#.###.
+..##..#.##
+
+Tile 3821:
+.##..##.#.
+...#...#.#
+#.##..#..#
+...#.#...#
+.....#...#
+.....##.#.
+....#....#
+#.....##.#
+#..#......
+.....#...#
+
+Tile 3011:
.#.##.#..#
-#.#.#.##.#
-....#...##
+.....#....
+......##.#
+..##.##..#
+....##....
+#..#.#...#
+..#......#
+##....#...
+##.......#
+#.####.###
+
+Tile 2833:
+.#.##....#
+.......#..
+#.##.##..#
+..#.#....#
+#.#....#..
+##.#......
+..........
+.#...#...#
+##.#.....#
+######.#..
+
+Tile 1409:
+..#......#
+..#.#..###
+#.#..#...#
+#...#..#.#
+#.....#..#
+.##..#..##
+..#......#
+......#...
+#......#.#
+##..#.#..#
+
+Tile 3527:
+........##
+.........#
+........#.
+...#..##.#
+......##..
+###.#..#.#
+...#....#.
+#.......##
+..........
+.#....###.
+
+Tile 3461:
+#.#.#.###.
+#.#......#
+##.......#
+#..#.##...
+..##......
+...#....##
+#....#....
+..#.....##
+#...#...##
+#.#..##.##
+
+Tile 2663:
+..###.##.#
+#.##.....#
+.##.#...#.
+.#.....#.#
+#.#..###.#
+....##.#.#
+.........#
+#.##.#.#.#
+.........#
+#.###..#.#
+
+Tile 1511:
+.####.#.##
+.....#.###
+#...#....#
+...##....#
+..#.#.....
+..#...#..#
+..........
+#...##...#
+.#....#...
+#...#.###.
+
+Tile 2801:
+####.##..#
+....##...#
+#........#
+##..#..#..
+.....#...#
+....#.....
+......#..#
+#......##.
+.........#
+#..#####..
+
+Tile 2381:
+....####..
+..#.......
+...#..#..#
+#..#......
+#..#....#.
+#.........
+#.........
+#...#.#..#
+..####...#
+#....#.#.#
+
+Tile 1583:
+#...##.###
+#.#...##.#
+#.......#.
+...##....#
+#...#..#..
+##.......#
+......#..#
+#..#...#.#
+.##.#....#
+##....#.##
+
+Tile 1123:
+#...#...#.
+#..#..#...
+.#.......#
+#....#.###
+#.#...##..
+.#.....#.#
+.##.#..#..
+..........
+.##.#..#.#
+#.#####.##
+
+Tile 2797:
+#..#..#...
+....#.#.##
+......#.##
+#......##.
+#.......##
+...#.....#
+..##.....#
+.#.#.#...#
+##....#...
+..#.#.##.#
+
+Tile 3889:
+#.#.####.#
+.#..#.##..
+.....##..#
+##........
+#..#.....#
+#........#
+..#.....#.
+#.#.#....#
+.....##..#
+##.##.#..#
+
+Tile 2557:
+###.#....#
+##...#....
+...##.#...
+...#.....#
+..........
+#........#
+.#...#....
+.....#....
+..........
+#...##.#..
+
+Tile 1747:
+#..##...##
+.....#.#..
+.#.##.####
+##.......#
+###...#..#
+###.....#.
+#..#.....#
+#.#.......
+....###...
+###.#.##..
+
+Tile 3023:
+##..##...#
+#....#...#
+#.#......#
+...#...#.#
+..#.#.#..#
+#.......#.
+.......#.#
+..........
+...#....##
+#...#...##
+
+Tile 1579:
+###..##..#
+##....#..#
+..#..#..#.
+##.#....##
+#......#.#
+.##......#
+#.#.#....#
+#...#..#..
+#....#..##
+.#..#####.
+
+Tile 3881:
+.###.###..
+#..#......
+...#......
+.#..#...##
+#.#.#....#
+...#....##
+#..#......
+......##.#
+#..#......
+#.###..###
+
+Tile 3313:
+.#.#...###
+....##...#
+#.##.##.#.
+.#..#....#
+#...##....
+#...###...
+#.........
+...###....
+#....#....
+##.###...#
+
+Tile 3947:
+.#.#..####
+.........#
+....#.#...
+###..#...#
+#...##..#.
+##....##..
+#.#.......
+##....#..#
+..#.#.....
+#.#.######
+
+Tile 1381:
+.#...#..#.
+.##..#.#.#
+##..#.....
+#.......#.
+.........#
+........#.
+#....#....
+#.....#.##
+#..#...#..
+#...##.#.#
+
+Tile 1319:
+..#...#.#.
+.###.#...#
+...#..#..#
+####..#..#
+#..#.###..
+###...#.##
+..#.#.#..#
+#.##.#....
+#.......##
+.#...###.#
+
+Tile 2011:
+###...##..
+##......##
+##...#...#
+......#.#.
+#....#....
+.#..#....#
+#....#..##
+.#.#.##..#
+.#.#......
+##.###.#..
+
+Tile 3163:
+.##.#..###
+#........#
+.##......#
+.###.###..
+..#.....##
+##...#...#
+#...##...#
+#.......##
+.#.....#..
...##..##.
-...#.#####
-.#.####.#.
-..#..###.#
-..##.#..#.
-Tile 1489:
+Tile 2441:
+####.##.#.
+#.....#..#
+.#..#..#..
+.##...#.#.
+..#..#.#.#
+..#..#..##
+#.#....###
+##........
+#...###..#
+#...######
+
+Tile 2111:
+.##.###..#
+.........#
+....#...##
+#.#......#
+#..#..####
+....#...#.
+.#...#.#.#
+#.........
+....#..#..
+.#.....###
+
+Tile 3931:
+####......
+###......#
+...##...#.
+#...###.#.
+#....#....
+...##.##.#
+#.#......#
+#.........
+....##....
+.....##.##
+
+Tile 3697:
+.#.#.##.##
+.....#...#
+#.........
+##.......#
+#........#
+#....##...
+#.#.....#.
+.......#..
+##...#....
+####.##.#.
+
+Tile 3709:
+.##.#.###.
+##..##....
+.#....#...
+##..##..##
+.#........
+..###.....
+#...#..#..
+.........#
+......##.#
+...##.##.#
+
+Tile 1619:
+.###..#.#.
+#....##...
+..##.##.##
+.....#....
+...#......
+#.....#...
+.###......
+..##...###
+#..#.....#
+##..#####.
+
+Tile 1777:
+..########
+#....#.#..
+..##..###.
+#.....#.#.
+..#......#
+#..#..#...
+#.......##
+#.##..#...
+##...#.#.#
+#..##.....
+
+Tile 2081:
+...#.##...
+#.#.##..##
+##....##.#
+#...##...#
+##........
+##..#.....
+#...##....
+#....#....
+.#..#....#
##.#.#....
-..##...#..
-.##..##...
-..#...#...
+
+Tile 3229:
+#...###.##
+#.#.##...#
+.....##..#
+#..#......
+#....#.#.#
+..........
+........##
+.#....#..#
+###.#...#.
+.###...#.#
+
+Tile 3767:
+#..#...###
+.#.#....#.
+#......#.#
+.........#
+#...##..##
+#......###
+.....#...#
+.#.......#
+#.#......#
+##.##.#.##
+
+Tile 3257:
+.#.#.###.#
+#.#.##....
+#.........
+.##......#
+..#....##.
+......#.#.
+#......#.#
+.........#
+##...##..#
+.#####...#
+
+Tile 3559:
+###..#..#.
+####......
+..##......
+#.#......#
+##....#..#
+#..#..##.#
+#.......#.
+#........#
+....#....#
+.#.###...#
+
+Tile 1427:
+##..######
+#....#.#.#
+..###..#.#
+.#..#...##
+.....#...#
+...#..#.#.
+##......#.
+.......#..
+..#...##.#
+##..#.#..#
+
+Tile 3853:
+##.##..###
+.#..#...#.
+##.##.....
+.....#..##
+#........#
+#..#....##
+#.#....#.#
+......##..
+##..#.....
+..#..##.#.
+
+Tile 3323:
+..##.#...#
+.#.....#..
+##...##...
+....#...#.
+#.#.##....
+##........
+#.....#..#
+.##....##.
+.#.......#
+.#####..#.
+
+Tile 1163:
+###..#.#.#
+#..#..#...
+#..##...##
+#.#...#.#.
+#...#....#
+#.#..#....
+......#...
+#....#.#..
+#....#.##.
+.#.......#
+
+Tile 1877:
#####...#.
-#..#.#.#.#
-...#.#.#..
-##.#...##.
-..##.##.##
-###.##.#..
+.....#...#
+#.#...#...
+#...#.#...
+.........#
+....#...##
+..#..#....
+#.##.....#
+.#........
+####..#..#
+
+Tile 1571:
+.#.......#
+..........
+#......#.#
+..#..#....
+..#...#..#
+.......#.#
+##......##
+....##.#.#
+##...##.##
+.#.#.....#
+
+Tile 1093:
+###...#..#
+#.#..####.
+..#.....#.
+##.#.#....
+#.....#..#
+#.##......
+.####.....
+#.#.......
+#.##...#.#
+...##..##.
-Tile 2473:
+Tile 2741:
+#....#.###
+.......#.#
+......#..#
+#.....#...
+.#....#..#
+.....#.#.#
+##.#...#..
+........#.
+#.....##..
+#.#..#.#.#
+
+Tile 2861:
+........#.
+.##.#....#
+..#..#....
+...#..#..#
+....#.#..#
+#....#...#
+#..###....
+#...####..
+#.......#.
+#...#.##.#
+
+Tile 3191:
+##..#.##..
+##.#....#.
+#.#..##.##
+#.##...###
+.......#.#
+#.#......#
+.#...#..#.
+#......#.#
+##.##....#
+#.#####..#
+
+Tile 3319:
+...#.#...#
+#.#.......
+#..#.##..#
+.##.#....#
+......#...
+#......#..
+.#..#.....
+........##
+..#..#..##
#....####.
+
+Tile 3299:
+##....#..#
+#..#......
+.#.####.#.
+....##....
+.#.##.....
#..#.##...
-#.##..#...
-######.#.#
-.#...#.#.#
-.#########
-.###.#..#.
-########.#
-##...##.#.
-..###.#.#.
+##......#.
+#.........
+#.......##
+.#.#....##
+
+Tile 3413:
+.#.....###
+#...#....#
+#........#
+..#..#..#.
+.##..#..#.
+#.....#...
+.##.#.##..
+#####.#.##
+..#..#####
+.#.#..###.
+
+Tile 2767:
+##.#.###.#
+..........
+.....##..#
+#....#....
+...#...#..
+#...##...#
+.......##.
+.....#.#.#
+....#....#
+#..#.#.##.
+
+Tile 2677:
+#.##....##
+#..##....#
+.......##.
+#...##..#.
+.........#
+.....#.#.#
+......#..#
+..##.....#
+#.#.....##
+#..#..#.#.
-Tile 2971:
+Tile 1489:
+##.#.#.##.
+.#...##.##
+.#..#..#..
+.....##..#
+#.##...#.#
..#.#....#
-#...###...
-#.#.###...
-##.##..#..
-.#####..##
-.#..####.#
-#..#.#..#.
-..####.###
-..#.#.###.
-...#.#.#.#
+.##...##..
+##........
+#.........
+##.####.#.
-Tile 2729:
-...#.#.#.#
-####.#....
-..#.#.....
-....#..#.#
-.##..##.#.
-.#.####...
-####.#.#..
-##.####...
-##..#.##..
-#.##...##.
+Tile 1657:
+#....#..##
+.#...#.#..
+#.#.......
+#.....#...
+.#..##.#.#
+#..#..#...
+##..#.##.#
+.##.#..#.#
+......#...
+#.#......#
-Tile 3079:
-#.#.#####.
-.#..######
-..#.......
-######....
-####.#..#.
-.#...#.##.
-#.#####.##
-..#.###...
-..#.......
-..#.###...
+Tile 1483:
+#.###...#.
+#.........
+#..###...#
+#..#..###.
+#..##..###
+#.###.....
+.##.....##
+#...#.#..#
+#...#.....
+##..#...#.
+
+Tile 2897:
+#..#....#.
+.......###
+#.........
+.##..#....
+##...#...#
+...#..#...
+....#.....
+#....#...#
+#.#.##..##
+####....##
+
+Tile 2113:
+###...#.##
+#........#
+.##..#.#.#
+#..#......
+.#.......#
+....#....#
+#####...##
+#...#.#...
+....#..##.
+.##...#..#
+
+Tile 3301:
+##.#..#..#
+#.#..#....
+.#.#..##..
+.........#
+..#.....##
+#.........
+..........
+#.#.#..#.#
+####....#.
+.##.#.####
+
+Tile 1549:
+.#.#...##.
+.........#
+.#.#...#..
+##........
+#.#....#..
+...#..#.#.
+#.......##
+#.....#...
+##......##
+#.#.#.#.##
diff --git a/2020/20/solve.c b/2020/20/solve.c
index 15d0a64..e6dd59d 100644
--- a/2020/20/solve.c
+++ b/2020/20/solve.c
@@ -75,6 +75,9 @@ long part_one(FILE *fp)
for (int i = 0; i < tile_cnt; i++) {
struct tile *tile = &tiles[i];
reverse(tile->top_rev, tile->top);
+ reverse(tile->right_rev, tile->right);
+ reverse(tile->bottom_rev, tile->bottom);
+ reverse(tile->left_rev, tile->left);
}
for (int i = 0; i < tile_cnt; i++) {
@@ -109,7 +112,6 @@ long part_one(FILE *fp)
}
for (int k = 0; k < tile_cnt; k++) {
- printf("%d: %d %d\n", cnt, tile->id, j);
struct tile *cmp = &tiles[k];
if (cmp->id == tile->id)
continue;
@@ -154,13 +156,11 @@ long part_one(FILE *fp)
int cnt = 0;
for (int j = 0; j < tile_cnt; j++) {
- //if (tile->match[j] > cnt)
cnt += tile->match[j];
}
- printf("%d - %d\n", cnt, tile->id);
- /* res *= tile->id; */
- //printf("%d\n", tile->best_cnt);
+ if (cnt == 2)
+ res *= tile->id;
}
return res;