Company: Amazon_18nov
Difficulty: medium
Maximum Subscription Cost Problem Description A cloud provider sells n base plans, with prices in planCost , and m add-on features, with prices in featureCost . A customer picks exactly one base plan and exactly one feature, and pays the sum of the two prices. Some combinations cannot be sold. The arrays incompatiblePlans and incompatibleFeatures list them in parallel: for each position i , the base plan incompatiblePlans[i] cannot be paired with the feature incompatibleFeatures[i] . Both arrays use 1-based indices. Report the highest total cost of any combination that is allowed. At least one allowed combination always exists. Function Description Complete the function getMaximumCost : long planCost[n] : the prices of the base plans. long featureCost[m] : the prices of the features. long incompatiblePlans[X] : the plan index of each forbidden combination. long incompatibleFeatures[X] : the feature index of each forbidden combination. Returns the maximum total cost of an allowed combin