google code jam,  Round A China New Grad Test 2014, test problem