r/adventofcode • u/daggerdragon • Dec 20 '20
SOLUTION MEGATHREAD -🎄- 2020 Day 20 Solutions -🎄-
Today is 2020 Day 20 and the final weekend puzzle for the year. Hold on to your butts and let's get hype!
NEW AND NOTEWORTHY
/u/topaz2078 has released new shop merch and it's absolutely adorable!
Advent of Code 2020: Gettin' Crafty With It
2 days remaining until the submission deadline on December 22 at 23:59 EST
Full details and rules are in the Submissions Megathread
--- Day 20: Jurassic Jigsaw ---
Post your code solution in this megathread.
Include what language(s) your solution uses!
Here's a quick link to /u/topaz2078's
pasteif you need it for longer code blocks.The full posting rules are detailed in the wiki under How Do The Daily Megathreads Work?.
Reminder: Top-level posts in Solution Megathreads are for code solutions only. If you have questions, please post your own thread and make sure to flair it with Help.
2
u/foolnotion Dec 21 '20
C++
I went the long way of designing a
tileclass along with operations to generate it's dihedral group. Then I consider the entire collection of tiles and all their rotations, reflections etc and backtrack through that, building the image one tile at a time from the top, row-major order. It's not very fast but runs in 30ms on my machine.github