1
0
mirror of https://gitee.com/coder-xiaomo/leetcode-problemset synced 2025-01-11 02:58:13 +08:00
Code Issues Projects Releases Wiki Activity GitHub Gitee
leetcode-problemset/leetcode-cn/problem (Chinese)/堆箱子 [pile-box-lcci].html
2022-03-29 12:43:11 +08:00

22 lines
752 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>堆箱子。给你一堆n个箱子箱子宽 wi、深 di、高 hi。箱子不能翻转将箱子堆起来时下面箱子的宽度、高度和深度必须大于上面的箱子。实现一种方法搭出最高的一堆箱子。箱堆的高度为每个箱子高度的总和。</p>
<p>输入使用数组<code>[wi, di, hi]</code>表示每个箱子。</p>
<p><strong>示例1:</strong></p>
<pre><strong> 输入</strong>box = [[1, 1, 1], [2, 2, 2], [3, 3, 3]]
<strong> 输出</strong>6
</pre>
<p><strong>示例2:</strong></p>
<pre><strong> 输入</strong>box = [[1, 1, 1], [2, 3, 4], [2, 6, 7], [3, 4, 5]]
<strong> 输出</strong>10
</pre>
<p><strong>提示:</strong></p>
<ol>
<li>箱子的数目不大于3000个。</li>
</ol>