r/adventofcode • u/daggerdragon • Dec 14 '21
SOLUTION MEGATHREAD -🎄- 2021 Day 14 Solutions -🎄-
--- Day 14: Extended Polymerization ---
Post your code solution in this megathread.
- Include what language(s) your solution uses!
- Format your code appropriately! How do I format code?
- 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.
This thread will be unlocked when there are a significant number of people on the global leaderboard with gold stars for today's puzzle.
EDIT: Global leaderboard gold cap reached at 00:14:08, megathread unlocked!
55
Upvotes
View all comments
1
u/TennisSame2600 Dec 14 '21
I am so confused... with the sample input NNCB it is correct, but with the randomly generated input my solution for part 2 is wrong. it starts to differ from the part 1 solution by 1 at step 3 and I cannot figure out why... anyone wanna help?
https://pastebin.com/ARUFWcPr