Allocate K people to hotels using the fewest hotels and then the least total capacity.
Unlock detailed company stats for this questionUpgrade
K is the total number of people that need accommodation. capacity[i] is the maximum number of people hotel i can accommodate. Each hotel can be used at most once, and if chosen, any number of people up to its capacity may stay there. Minimize the number of hotels used, and among all such solutions, minimize the total capacity used.
Community answers
No answers contributed by the community yet.
Related courses

Course

Course
Course
