1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-10 18:48:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/最小面积矩形 [minimum-area-rectangle].html
2022-03-29 12:43:11 +08:00

29 lines
774 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>给定在 xy 平面上的一组点,确定由这些点组成的矩形的最小面积,其中矩形的边平行于 x 轴和 y 轴。</p>
<p>如果没有任何矩形,就返回 0。</p>
<p>&nbsp;</p>
<p><strong>示例 1</strong></p>
<pre><strong>输入:</strong>[[1,1],[1,3],[3,1],[3,3],[2,2]]
<strong>输出:</strong>4
</pre>
<p><strong>示例 2</strong></p>
<pre><strong>输入:</strong>[[1,1],[1,3],[3,1],[3,3],[4,1],[4,3]]
<strong>输出:</strong>2
</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ol>
<li><code>1 &lt;= points.length &lt;= 500</code></li>
<li><code>0 &lt;=&nbsp;points[i][0] &lt;=&nbsp;40000</code></li>
<li><code>0 &lt;=&nbsp;points[i][1] &lt;=&nbsp;40000</code></li>
<li>所有的点都是不同的。</li>
</ol>