mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-13 11:21:42 +08:00
add leetcode problem-cn part3
This commit is contained in:
32
算法题(国内版)/problem (Chinese)/安装栅栏 [erect-the-fence].html
Normal file
32
算法题(国内版)/problem (Chinese)/安装栅栏 [erect-the-fence].html
Normal file
@@ -0,0 +1,32 @@
|
||||
<p>在一个二维的花园中,有一些用 (x, y) 坐标表示的树。由于安装费用十分昂贵,你的任务是先用<strong>最短</strong>的绳子围起所有的树。只有当所有的树都被绳子包围时,花园才能围好栅栏。你需要找到正好位于栅栏边界上的树的坐标。</p>
|
||||
|
||||
|
||||
|
||||
<p> </p>
|
||||
|
||||
|
||||
|
||||
<p><strong>示例 1:</strong></p>
|
||||
|
||||
|
||||
|
||||
<pre><strong>输入:</strong> [[1,1],[2,2],[2,0],[2,4],[3,3],[4,2]]
|
||||
|
||||
<strong>输出:</strong> [[1,1],[2,0],[4,2],[3,3],[2,4]]
|
||||
|
||||
<strong>解释:</strong>
|
||||
|
||||
<img src="https://assets.leetcode-cn.com/aliyun-lc-upload/uploads/2018/10/12/erect_the_fence_1.png" style="width: 100%; max-width: 320px">
|
||||
|
||||
</pre>
|
||||
|
||||
|
||||
|
||||
<p><strong>示例 2:</strong></p>
|
||||
|
||||
|
||||
|
||||
<pre><strong>输入:</strong> [[1,2],[2,2],[4,2]]
|
||||
|
||||
<strong>输出:</strong> [[1,2],[2,2],[4,2]]
|
||||
|
Reference in New Issue
Block a user