We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Kind of confused:
For any grouping of N = 3 of her accessories, there must be at least D = 2 distinct types of accessories.
Victoria can satisfy her shopping rule and spend the maximum amount of money by purchasing the following set of accessories: {3, 4, 5, 5, 4, 3}. The total cost is 24, so we print on a new line.
In order to have subsets of 3 with at least 2 distinct accessory in each subset, wouldn't {(5, 5, 4), (5, 5, 4)} maximize it to 28?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Accessory Collection
You are viewing a single comment's thread. Return to all comments →
Kind of confused: For any grouping of N = 3 of her accessories, there must be at least D = 2 distinct types of accessories.
Victoria can satisfy her shopping rule and spend the maximum amount of money by purchasing the following set of accessories: {3, 4, 5, 5, 4, 3}. The total cost is 24, so we print on a new line.
In order to have subsets of 3 with at least 2 distinct accessory in each subset, wouldn't {(5, 5, 4), (5, 5, 4)} maximize it to 28?