Candy cup Boom

oops, Mr. licorice accidentally mixed up all the candies, what a mess, Mr. licorice tries to sort them but he can't do it alone, Help him sort the candy before time runs out in a limited number of moves