solved candies in dynamic programming track