Maximize the Revenue There are n types of items in a shop, where the number of items of type i is denoted by quantity[i]. The price of the items is determined dynamically, where the price of the i th item is equal to the remaining number of items of type i . There are m customers in line to buy the items from the shop, and each customer will buy exactly one item of any type. The shopkeeper, being greedy, trfes to sell the items in a way that maximises revenue. Find the maximum amount the shopkeeper can earn by selling exactly m items to the customers optimally.