1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-11 02:58:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/最大三角形面积 [largest-triangle-area].html
2022-03-29 12:43:11 +08:00

21 lines
785 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<p>给定包含多个点的集合,从其中取三个点组成三角形,返回能组成的最大三角形的面积。</p>
<pre>
<strong>示例:</strong>
<strong>输入:</strong> points = [[0,0],[0,1],[1,0],[0,2],[2,0]]
<strong>输出:</strong> 2
<strong>解释:</strong>
这五个点如下图所示。组成的橙色三角形是最大的面积为2。
</pre>
<p><img alt="" src="https://s3-lc-upload.s3.amazonaws.com/uploads/2018/04/04/1027.png" style="height:328px; width:400px" /></p>
<p><strong>注意: </strong></p>
<ul>
<li><code>3 &lt;= points.length &lt;= 50</code>.</li>
<li>不存在重复的点。</li>
<li>&nbsp;<code>-50 &lt;= points[i][j] &lt;= 50</code>.</li>
<li>结果误差值在&nbsp;<code>10^-6</code>&nbsp;以内都认为是正确答案。</li>
</ul>