Company: citadel_3aug
Difficulty: medium
Minimum Processing Cost Problem Description There are n images to process. Image i must have a filter applied on every day from startDay[i] through endDay[i] , inclusive. Applying the filter to image i on its own costs filterCost[i] for each such day. There is also an exclusive offer: on any single day you may instead pay a flat discountPrice , and that one payment applies the filter to all images that need processing on that day. The choice is made independently for each day: on every day you pay either the sum of filterCost[i] over the images active that day, or discountPrice , whichever you choose. A day on which no image needs processing costs nothing. Find the minimum total cost of processing every image on all of its required days, and return it modulo 10^9 + 7 . Complete the function getMinProcessingCost(filterCost, startDay, endDay, discountPrice) , which returns this value. Input Format Read from standard input. n filterCost[0] filterCost[1] ... filterCost[n-1] startDay[0] sta