A couple of scripts that I wrote when tackling the TreeHacks 2015 puzzle problems.