mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-11 18:31:41 +08:00
存量题库数据更新
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
<p>先选几本书放在书架上(它们的厚度之和小于等于书架的宽度 <code>shelfWidth</code> ),然后再建一层书架。重复这个过程,直到把所有的书都放在书架上。</p>
|
||||
|
||||
<p>需要注意的是,在上述过程的每个步骤中,<strong>摆放书的顺序与你整理好的顺序相同</strong>。</p>
|
||||
<p>需要注意的是,在上述过程的每个步骤中,<strong>摆放书的顺序与给定图书数组 </strong><code>books</code><strong> 顺序相同</strong>。</p>
|
||||
|
||||
<ul>
|
||||
<li>例如,如果这里有 5 本书,那么可能的一种摆放情况是:第一和第二本书放在第一层书架上,第三本书放在第二层书架上,第四和第五本书放在最后一层书架上。</li>
|
||||
@@ -16,19 +16,19 @@
|
||||
|
||||
<p> </p>
|
||||
|
||||
<p><strong>示例 1:</strong></p>
|
||||
<p><strong class="example">示例 1:</strong></p>
|
||||
|
||||
<p><img src="https://assets.leetcode.com/uploads/2019/06/24/shelves.png" style="width: 337px; height: 500px;" /></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入:</strong>books = [[1,1],[2,3],[2,3],[1,1],[1,1],[1,1],[1,2]], shelf_width = 4
|
||||
<strong>输入:</strong>books = [[1,1],[2,3],[2,3],[1,1],[1,1],[1,1],[1,2]], shelfWidth = 4
|
||||
<strong>输出:</strong>6
|
||||
<strong>解释:</strong>
|
||||
3 层书架的高度和为 1 + 3 + 2 = 6 。
|
||||
第 2 本书不必放在第一层书架上。
|
||||
</pre>
|
||||
|
||||
<p><strong>示例 2:</strong></p>
|
||||
<p><strong class="example">示例 2:</strong></p>
|
||||
|
||||
<pre>
|
||||
<strong>输入:</strong> books = [[1,3],[2,4],[3,2]], shelfWidth = 6
|
||||
|
Reference in New Issue
Block a user