LG Codejam 2014 - a(incomplete)