CodeJam 2014

Round 1A