mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-24 14:28:56 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>你有一个凸的<meta charset=\"UTF-8\" /> <code>n</code> 边形,其每个顶点都有一个整数值。给定一个整数数组<meta charset=\"UTF-8\" /> <code>values</code> ,其中<meta charset=\"UTF-8\" /> <code>values[i]</code> 是第 <code>i</code> 个顶点的值(即 <strong>顺时针顺序</strong> )。</p>\n\n<p>假设将多边形 <strong>剖分</strong> 为 <code>n - 2</code> 个三角形。对于每个三角形,该三角形的值是顶点标记的<strong>乘积</strong>,三角剖分的分数是进行三角剖分后所有 <code>n - 2</code> 个三角形的值之和。</p>\n\n<p>返回 <em>多边形进行三角剖分后可以得到的最低分</em> 。<br />\n </p>\n\n<ol>\n</ol>\n\n<p><strong>示例 1:</strong></p>\n\n<p><img alt=\"\" src=\"https://assets.leetcode.com/uploads/2021/02/25/shape1.jpg\" /></p>\n\n<pre>\n<strong>输入:</strong>values = [1,2,3]\n<strong>输出:</strong>6\n<strong>解释:</strong>多边形已经三角化,唯一三角形的分数为 6。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<p><img alt=\"\" src=\"https://assets.leetcode.com/uploads/2021/02/25/shape2.jpg\" style=\"height: 163px; width: 446px;\" /></p>\n\n<pre>\n<strong>输入:</strong>values = [3,7,4,5]\n<strong>输出:</strong>144\n<strong>解释:</strong>有两种三角剖分,可能得分分别为:3*7*5 + 4*5*7 = 245,或 3*4*5 + 3*4*7 = 144。最低分数为 144。\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<p><img alt=\"\" src=\"https://assets.leetcode.com/uploads/2021/02/25/shape3.jpg\" /></p>\n\n<pre>\n<strong>输入:</strong>values = [1,3,1,4,1,5]\n<strong>输出:</strong>13\n<strong>解释:</strong>最低分数三角剖分的得分情况为 1*1*3 + 1*1*4 + 1*1*5 + 1*1*1 = 13。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>n == values.length</code></li>\n\t<li><code>3 <= n <= 50</code></li>\n\t<li><code>1 <= values[i] <= 100</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 110,
|
||||
"likes": 111,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -143,7 +143,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"5.4K\", \"totalSubmission\": \"9.5K\", \"totalAcceptedRaw\": 5368, \"totalSubmissionRaw\": 9463, \"acRate\": \"56.7%\"}",
|
||||
"stats": "{\"totalAccepted\": \"5.6K\", \"totalSubmission\": \"9.8K\", \"totalAcceptedRaw\": 5558, \"totalSubmissionRaw\": 9806, \"acRate\": \"56.7%\"}",
|
||||
"hints": [
|
||||
"Without loss of generality, there is a triangle that uses adjacent vertices A[0] and A[N-1] (where N = A.length). Depending on your choice K of it, this breaks down the triangulation into two subproblems A[1:K] and A[K+1:N-1]."
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user