ioi 2014 - contest 1 - Christopher's Candy Chaos