Save 25%Black Friday: 25% off all plans — use code BLACKFRIDAY2026 at checkout. Ends Friday, Dec 4.Claim the deal

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.
Test Cases
Input
Output
Expected