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)/文物朝代判断 [bu-ke-pai-zhong-de-shun-zi-lcof].html
2023-12-09 18:53:53 +08:00

31 lines
880 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>展览馆展出来自 13 个朝代的文物,每排展柜展出 5 个文物。某排文物的摆放情况记录于数组 <code>places</code>,其中 <code>places[i]</code> 表示处于第 <code>i</code> 位文物的所属朝代编号。其中,编号为 0 的朝代表示未知朝代。请判断并返回这排文物的所属朝代编号是否连续(如遇未知朝代可算作连续情况)。</p>
<p>&nbsp;</p>
<p><strong>示例&nbsp;1</strong></p>
<pre>
<strong>输入: </strong>places = [0, 6, 9, 0, 7]
<strong>输出: </strong>True
</pre>
<p>&nbsp;</p>
<p><strong>示例&nbsp;2</strong></p>
<pre>
<strong>输入: </strong>places = [7, 8, 9, 10, 11]
<strong>输出:</strong> True
</pre>
<p>&nbsp;</p>
<p><strong>提示:</strong></p>
<ul>
<li><code>places.length = 5</code></li>
<li><code>0 &lt;= places[i] &lt;= 13</code></li>
</ul>
<p>&nbsp;</p>