Find the minimum cost to acquire a target set of items using available menu entries or combos.
Each menu entry can satisfy multiple requested items simultaneously, allowing for strategic grouping.
Return -1.0 if the target items cannot be fully covered by any combination of menu entries.
What This Tests
Subset state representation and enumeration
Recursive decomposition with overlapping subproblems
Optimization over combinatorial choice spaces
Handling unreachable states and boundary conditions
Common Patterns
Dynamic Programming
Bit Manipulation
Backtracking
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Test Cases
Input
Output
Expected
A food delivery service wants to help customers minimize the total cost when ordering a specific set of dishes from a restaurant menu.
The menu is given as a list of entries, where each entry contains a unique ID, a price, and a comma-separated list of unique item names (which may represent either a single item or a combo meal), in format "<item1>,<item2>,...".
Customers provide a list of unique items they wish to order, given as userWants.