mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-04 06:51:41 +08:00
存量题库数据更新
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<p>Return <em>the lowest price you have to pay for exactly certain items as given, where you could make optimal use of the special offers</em>. You are not allowed to buy more items than you want, even if that would lower the overall price. You could use any of the special offers as many times as you want.</p>
|
||||
|
||||
<p> </p>
|
||||
<p><strong>Example 1:</strong></p>
|
||||
<p><strong class="example">Example 1:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> price = [2,5], special = [[3,0,5],[1,2,10]], needs = [3,2]
|
||||
@@ -18,7 +18,7 @@ In special offer 2, you can pay $10 for 1A and 2B.
|
||||
You need to buy 3A and 2B, so you may pay $10 for 1A and 2B (special offer #2), and $4 for 2A.
|
||||
</pre>
|
||||
|
||||
<p><strong>Example 2:</strong></p>
|
||||
<p><strong class="example">Example 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>Input:</strong> price = [2,3,4], special = [[1,1,0,4],[2,2,1,9]], needs = [1,2,1]
|
||||
@@ -33,11 +33,9 @@ You cannot add more items, though only $9 for 2A ,2B and 1C.
|
||||
<p><strong>Constraints:</strong></p>
|
||||
|
||||
<ul>
|
||||
<li><code>n == price.length</code></li>
|
||||
<li><code>n == needs.length</code></li>
|
||||
<li><code>n == price.length == needs.length</code></li>
|
||||
<li><code>1 <= n <= 6</code></li>
|
||||
<li><code>0 <= price[i] <= 10</code></li>
|
||||
<li><code>0 <= needs[i] <= 10</code></li>
|
||||
<li><code>0 <= price[i], needs[i] <= 10</code></li>
|
||||
<li><code>1 <= special.length <= 100</code></li>
|
||||
<li><code>special[i].length == n + 1</code></li>
|
||||
<li><code>0 <= special[i][j] <= 50</code></li>
|
||||
|
Reference in New Issue
Block a user