mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-01-11 02:58:13 +08:00
21 lines
785 B
HTML
21 lines
785 B
HTML
<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 <= points.length <= 50</code>.</li>
|
||
<li>不存在重复的点。</li>
|
||
<li> <code>-50 <= points[i][j] <= 50</code>.</li>
|
||
<li>结果误差值在 <code>10^-6</code> 以内都认为是正确答案。</li>
|
||
</ul>
|