|
6 | 6 |
|
7 | 7 | <!-- 这里写题目描述 -->
|
8 | 8 |
|
9 |
| -<p><img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/1300-1399/1386.Cinema%20Seat%20Allocation/images/cinema_seats_1.png" style="height: 149px; width: 400px;"></p> |
| 9 | +<p><img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/1300-1399/1386.Cinema%20Seat%20Allocation/images/cinema_seats_1.png" style="height: 149px; width: 400px;" /></p> |
10 | 10 |
|
11 | 11 | <p>如上图所示,电影院的观影厅中有 <code>n</code> 行座位,行编号从 1 到 <code>n</code> ,且每一行内总共有 10 个座位,列编号从 1 到 10 。</p>
|
12 | 12 |
|
13 |
| -<p>给你数组 <code>reservedSeats</code> ,包含所有已经被预约了的座位。比如说,<code>researvedSeats[i]=[3,8]</code> ,它表示第 <strong>3</strong> 行第 <strong>8</strong> 个座位被预约了。</p> |
| 13 | +<p>给你数组 <code>reservedSeats</code> ,包含所有已经被预约了的座位。比如说,<code>reservedSeats[i]=[3,8]</code> ,它表示第 <strong>3</strong> 行第 <strong>8</strong> 个座位被预约了。</p> |
14 | 14 |
|
15 | 15 | <p>请你返回 <strong>最多能安排多少个 4 人家庭</strong> 。4 人家庭要占据 <strong>同一行内连续 </strong>的 4 个座位。隔着过道的座位(比方说 [3,3] 和 [3,4])不是连续的座位,但是如果你可以将 4 人家庭拆成过道两边各坐 2 人,这样子是允许的。</p>
|
16 | 16 |
|
17 | 17 | <p> </p>
|
18 | 18 |
|
19 | 19 | <p><strong>示例 1:</strong></p>
|
20 | 20 |
|
21 |
| -<p><img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/1300-1399/1386.Cinema%20Seat%20Allocation/images/cinema_seats_3.png" style="height: 96px; width: 400px;"></p> |
| 21 | +<p><img alt="" src="https://fastly.jsdelivr.net/gh/doocs/leetcode@main/solution/1300-1399/1386.Cinema%20Seat%20Allocation/images/cinema_seats_3.png" style="height: 96px; width: 400px;" /></p> |
22 | 22 |
|
23 |
| -<pre><strong>输入:</strong>n = 3, reservedSeats = [[1,2],[1,3],[1,8],[2,6],[3,1],[3,10]] |
| 23 | +<pre> |
| 24 | +<strong>输入:</strong>n = 3, reservedSeats = [[1,2],[1,3],[1,8],[2,6],[3,1],[3,10]] |
24 | 25 | <strong>输出:</strong>4
|
25 | 26 | <strong>解释:</strong>上图所示是最优的安排方案,总共可以安排 4 个家庭。蓝色的叉表示被预约的座位,橙色的连续座位表示一个 4 人家庭。
|
26 | 27 | </pre>
|
27 | 28 |
|
28 | 29 | <p><strong>示例 2:</strong></p>
|
29 | 30 |
|
30 |
| -<pre><strong>输入:</strong>n = 2, reservedSeats = [[2,1],[1,8],[2,6]] |
| 31 | +<pre> |
| 32 | +<strong>输入:</strong>n = 2, reservedSeats = [[2,1],[1,8],[2,6]] |
31 | 33 | <strong>输出:</strong>2
|
32 | 34 | </pre>
|
33 | 35 |
|
34 | 36 | <p><strong>示例 3:</strong></p>
|
35 | 37 |
|
36 |
| -<pre><strong>输入:</strong>n = 4, reservedSeats = [[4,3],[1,4],[4,6],[1,7]] |
| 38 | +<pre> |
| 39 | +<strong>输入:</strong>n = 4, reservedSeats = [[4,3],[1,4],[4,6],[1,7]] |
37 | 40 | <strong>输出:</strong>4
|
38 | 41 | </pre>
|
39 | 42 |
|
|
0 commit comments