mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-02 14:12:17 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>一个数组的 <strong>最小乘积</strong> 定义为这个数组中 <strong>最小值</strong> <strong>乘以 </strong>数组的 <strong>和</strong> 。</p>\n\n<ul>\n\t<li>比方说,数组 <code>[3,2,5]</code> (最小值是 <code>2</code>)的最小乘积为 <code>2 * (3+2+5) = 2 * 10 = 20</code> 。</li>\n</ul>\n\n<p>给你一个正整数数组 <code>nums</code> ,请你返回 <code>nums</code> 任意 <strong>非空子数组</strong> 的<strong>最小乘积</strong> 的 <strong>最大值</strong> 。由于答案可能很大,请你返回答案对 <code>10<sup>9</sup> + 7</code> <strong>取余 </strong>的结果。</p>\n\n<p>请注意,最小乘积的最大值考虑的是取余操作 <strong>之前</strong> 的结果。题目保证最小乘积的最大值在 <strong>不取余</strong> 的情况下可以用 <strong>64 位有符号整数</strong> 保存。</p>\n\n<p><strong>子数组</strong> 定义为一个数组的 <strong>连续</strong> 部分。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<b>输入:</b>nums = [1,<strong>2,3,2</strong>]\n<b>输出:</b>14\n<b>解释:</b>最小乘积的最大值由子数组 [2,3,2] (最小值是 2)得到。\n2 * (2+3+2) = 2 * 7 = 14 。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<b>输入:</b>nums = [2,<strong>3,3</strong>,1,2]\n<b>输出:</b>18\n<b>解释:</b>最小乘积的最大值由子数组 [3,3] (最小值是 3)得到。\n3 * (3+3) = 3 * 6 = 18 。\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre>\n<b>输入:</b>nums = [3,1,<strong>5,6,4</strong>,2]\n<b>输出:</b>60\n<b>解释:</b>最小乘积的最大值由子数组 [5,6,4] (最小值是 4)得到。\n4 * (5+6+4) = 4 * 15 = 60 。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= nums.length <= 10<sup>5</sup></code></li>\n\t<li><code>1 <= nums[i] <= 10<sup>7</sup></code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 72,
|
||||
"likes": 75,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -155,7 +155,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"5.4K\", \"totalSubmission\": \"15.2K\", \"totalAcceptedRaw\": 5436, \"totalSubmissionRaw\": 15163, \"acRate\": \"35.9%\"}",
|
||||
"stats": "{\"totalAccepted\": \"5.7K\", \"totalSubmission\": \"15.9K\", \"totalAcceptedRaw\": 5654, \"totalSubmissionRaw\": 15905, \"acRate\": \"35.5%\"}",
|
||||
"hints": [
|
||||
"Is there a way we can sort the elements to simplify the problem?",
|
||||
"Can we find the maximum min-product for every value in the array?"
|
||||
|
Reference in New Issue
Block a user