Skip to content

wai1/Accessory_Collection_HackerRank

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Accessory_Collection_HackerRank - VS

Program solves Accessory Collection problem from HackerRank

Program solves Accessory Collection problem from HakerRank

Problem: Victoria is purchasing accessories at a store. Each store stocks A types of accessories. The i^th accessory costs i dollars (1<=i<=A). Assume an item's type identifier is the same as its cost and there is an ulimited amount of each accessory. Vicotria wants to purchase a total of L accessories according to the following rule: Any N-element subset of the purchased items must contain at least D different types of accessories.

Given L, A, N, and D values for T shopping trips, find and print the maximum amount of money that Victoria can spen during each trip. Output SAD if it is not possible for Victoria to make a purchase on a given trip. Anwer for each trip is printed on a new line.

About

Program solves Accessory Collection problem from HacerRank

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published