Who Gets the Most Candies?

POJ - 2886