1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-09-09 17:31:41 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee

存量题库数据更新

This commit is contained in:
2023-12-09 18:42:21 +08:00
parent a788808cd7
commit c198538f10
10843 changed files with 288489 additions and 248355 deletions

View File

@@ -1,19 +1,19 @@
<p>冬季已经来临。 你的任务是设计一个有固定加热半径的供暖器向所有房屋供暖。</p>
<p>冬季已经来临。&nbsp;你的任务是设计一个有固定加热半径的供暖器向所有房屋供暖。</p>
<p>在加热器的加热半径范围内的每个房屋都可以获得供暖。</p>
<p>现在,给出位于一条水平线上的房屋 <code>houses</code> 和供暖器 <code>heaters</code> 的位置,请你找出并返回可以覆盖所有房屋的最小加热半径。</p>
<p>现在,给出位于一条水平线上的房屋&nbsp;<code>houses</code> 和供暖器&nbsp;<code>heaters</code> 的位置,请你找出并返回可以覆盖所有房屋的最小加热半径。</p>
<p><strong>说明</strong>:所有供暖器都遵循你的半径标准,加热的半径也一样。</p>
<p><b>注意</b>:所有供暖器 <code>heaters</code> 都遵循你的半径标准,加热的半径也一样。</p>
<p> </p>
<p>&nbsp;</p>
<p><strong>示例 1:</strong></p>
<pre>
<strong>输入:</strong> houses = [1,2,3], heaters = [2]
<strong>输出:</strong> 1
<strong>解释:</strong> 仅在位置2上有一个供暖器。如果我们将加热半径设为1那么所有房屋就都能得到供暖。
<strong>解释:</strong> 仅在位置 2 上有一个供暖器。如果我们将加热半径设为 1那么所有房屋就都能得到供暖。
</pre>
<p><strong>示例 2:</strong></p>
@@ -21,7 +21,7 @@
<pre>
<strong>输入:</strong> houses = [1,2,3,4], heaters = [1,4]
<strong>输出:</strong> 1
<strong>解释:</strong> 在位置1, 4上有两个供暖器。我们需要将加热半径设为1这样所有房屋就都能得到供暖。
<strong>解释:</strong> 在位置 1, 4 上有两个供暖器。我们需要将加热半径设为 1这样所有房屋就都能得到供暖。
</pre>
<p><strong>示例 3</strong></p>
@@ -31,11 +31,11 @@
<strong>输出:</strong>3
</pre>
<p> </p>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>1 <= houses.length, heaters.length <= 3 * 10<sup>4</sup></code></li>
<li><code>1 <= houses[i], heaters[i] <= 10<sup>9</sup></code></li>
<li><code>1 &lt;= houses.length, heaters.length &lt;= 3 * 10<sup>4</sup></code></li>
<li><code>1 &lt;= houses[i], heaters[i] &lt;= 10<sup>9</sup></code></li>
</ul>