Advent of Code 2017

Using this monstrosity, I was able to shave it off by some 40%. The code is quite ugly, but the idea is fairly simple, based on sieves. I’m generating failed positions in sorted order, and then stop when the difference between two consecutive positions is > 1. Not sure if the code is 100% correct, but it gives the same output for my input :smiley:

2 Likes