Shopping Offers

Starter Contract

The starter function is solve(price, special, needs). Each special row has one quantity for every item followed by the offer price. Return the minimum cost for exactly needs, using an offer only when every item quantity fits.

Given item prices and special offers (bundles of items at a discounted price), find the minimum cost to purchase exactly the required quantities of each item. You may use any number of each special offer.

Examples
Input: [[2,5],[[3,0,5],[1,2,10]],[3,2]]
Output: 14
Hints

Shopping Offers

The starter function is `solve(price, special, needs)`. Each `special` row has