Skip to content

Commit 98abe13

Browse files
authored
feat: update lc problems (doocs#3254)
1 parent 9c9f3a6 commit 98abe13

File tree

13 files changed

+30
-20
lines changed

13 files changed

+30
-20
lines changed

solution/0100-0199/0130.Surrounded Regions/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ tags:
2424

2525
<ul>
2626
<li><strong>连接:</strong>一个单元格与水平或垂直方向上相邻的单元格连接。</li>
27-
<li><strong>区域:连接所有&nbsp;</strong><code>'0'</code>&nbsp;的单元格来形成一个区域。</li>
27+
<li><strong>区域:连接所有&nbsp;</strong><code>'O'</code>&nbsp;的单元格来形成一个区域。</li>
2828
<li><strong>围绕:</strong>如果您可以用&nbsp;<code>'X'</code>&nbsp;单元格 <strong>连接这个区域</strong>,并且区域中没有任何单元格位于&nbsp;<code>board</code> 边缘,则该区域被 <code>'X'</code>&nbsp;单元格围绕。</li>
2929
</ul>
3030

solution/0600-0699/0683.K Empty Slots/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ difficulty: 困难
44
edit_url: https://github.com/doocs/leetcode/edit/main/solution/0600-0699/0683.K%20Empty%20Slots/README.md
55
tags:
66
- 树状数组
7+
- 线段树
8+
- 队列
79
- 数组
810
- 有序集合
911
- 滑动窗口
12+
- 单调队列
13+
- 堆(优先队列)
1014
---
1115

1216
<!-- problem:start -->

solution/0600-0699/0683.K Empty Slots/README_EN.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@ difficulty: Hard
44
edit_url: https://github.com/doocs/leetcode/edit/main/solution/0600-0699/0683.K%20Empty%20Slots/README_EN.md
55
tags:
66
- Binary Indexed Tree
7+
- Segment Tree
8+
- Queue
79
- Array
810
- Ordered Set
911
- Sliding Window
12+
- Monotonic Queue
13+
- Heap (Priority Queue)
1014
---
1115

1216
<!-- problem:start -->

solution/1300-1399/1395.Count Number of Teams/README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,18 @@ tags:
2020

2121
<!-- description:start -->
2222

23-
<p> <code>n</code> 名士兵站成一排。每个士兵都有一个 <strong>独一无二</strong> 的评分 <code>rating</code> 。</p>
23+
<p>&nbsp;<code>n</code> 名士兵站成一排。每个士兵都有一个 <strong>独一无二</strong> 的评分 <code>rating</code> 。</p>
2424

25-
<p> <strong>3</strong> 个士兵可以组成一个作战单位,分组规则如下:</p>
25+
<p>从中选出 <strong>3</strong> 个士兵组成一个作战单位,规则如下:</p>
2626

2727
<ul>
2828
<li>从队伍中选出下标分别为 <code>i</code>、<code>j</code>、<code>k</code> 的 3 名士兵,他们的评分分别为 <code>rating[i]</code>、<code>rating[j]</code>、<code>rating[k]</code></li>
29-
<li>作战单位需满足: <code>rating[i] < rating[j] < rating[k]</code> 或者 <code>rating[i] > rating[j] > rating[k]</code> ,其中  <code>0 <= i < j < k < n</code></li>
29+
<li>作战单位需满足: <code>rating[i] &lt; rating[j] &lt; rating[k]</code> 或者 <code>rating[i] &gt; rating[j] &gt; rating[k]</code> ,其中&nbsp; <code>0&nbsp;&lt;= i &lt;&nbsp;j &lt;&nbsp;k &lt;&nbsp;n</code></li>
3030
</ul>
3131

32-
<p>请你返回按上述条件可以组建的作战单位数量。每个士兵都可以是多个作战单位的一部分。</p>
32+
<p>请你返回按上述条件组建的作战单位的方案数。</p>
3333

34-
<p> </p>
34+
<p>&nbsp;</p>
3535

3636
<p><strong>示例 1:</strong></p>
3737

@@ -56,15 +56,15 @@ tags:
5656
<strong>输出:</strong>4
5757
</pre>
5858

59-
<p> </p>
59+
<p>&nbsp;</p>
6060

6161
<p><strong>提示:</strong></p>
6262

6363
<ul>
6464
<li><code>n == rating.length</code></li>
65-
<li><code>3 <= n <= 1000</code></li>
66-
<li><code>1 <= rating[i] <= 10^5</code></li>
67-
<li><code>rating</code> 中的元素都是唯一的</li>
65+
<li><code>3 &lt;= n &lt;= 1000</code></li>
66+
<li><code>1 &lt;= rating[i] &lt;= 10^5</code></li>
67+
<li><code>rating</code>&nbsp;中的元素都是唯一的</li>
6868
</ul>
6969

7070
<!-- description:end -->

solution/1500-1599/1515.Best Position for a Service Centre/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ rating: 2156
66
source: 第 197 场周赛 Q4
77
tags:
88
- 几何
9+
- 数组
910
- 数学
1011
- 随机化
1112
---

solution/1500-1599/1515.Best Position for a Service Centre/README_EN.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ rating: 2156
66
source: Weekly Contest 197 Q4
77
tags:
88
- Geometry
9+
- Array
910
- Math
1011
- Randomized
1112
---

solution/3000-3099/3086.Minimum Moves to Pick K Ones/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ tags:
4444
<p><strong>解释:</strong>如果游戏开始时&nbsp;Alice 在 <code>aliceIndex == 1</code> 的位置上,按照以下步骤执行每个动作,他可以利用 <code>3</code> 次行动拾取 <code>3</code> 个 1 :</p>
4545

4646
<ul>
47-
<li>游戏开始时&nbsp;Alice 拾取了一个 1 ,<code>nums[1]</code> 变成了 <code>0</code>。此时 <code>nums</code> 变为 <code>[1,<strong><u>0</u></strong>,1,0,0,1,1,0,0,1]</code> 。</li>
47+
<li>游戏开始时&nbsp;Alice 拾取了一个 1 ,<code>nums[1]</code> 变成了 <code>0</code>。此时 <code>nums</code> 变为 <code>[1,<strong><u>0</u></strong>,0,0,0,1,1,0,0,1]</code> 。</li>
4848
<li>选择 <code>j == 2</code> 并执行第一种类型的动作。<code>nums</code> 变为 <code>[1,<strong><u>0</u></strong>,1,0,0,1,1,0,0,1]</code></li>
4949
<li>选择 <code>x == 2</code> 和 <code>y == 1</code> ,并执行第二种类型的动作。<code>nums</code> 变为 <code>[1,<strong><u>1</u></strong>,0,0,0,1,1,0,0,1]</code> 。由于 <code>y == aliceIndex</code>,Alice 拾取了一个 1 ,<code>nums</code> 变为&nbsp; <code>[1,<strong><u>0</u></strong>,0,0,0,1,1,0,0,1]</code> 。</li>
5050
<li>选择 <code>x == 0</code> 和 <code>y == 1</code> ,并执行第二种类型的动作。<code>nums</code> 变为 <code>[0,<strong><u>1</u></strong>,0,0,0,1,1,0,0,1]</code> 。由于 <code>y == aliceIndex</code>,Alice 拾取了一个 1 ,<code>nums</code> 变为&nbsp; <code>[0,<strong><u>0</u></strong>,0,0,0,1,1,0,0,1]</code> 。</li>

solution/3000-3099/3098.Find the Sum of Subsequence Powers/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ tags:
2222

2323
<p>给你一个长度为 <code>n</code>&nbsp;的整数数组&nbsp;<code>nums</code>&nbsp;和一个 <strong>正</strong>&nbsp;整数&nbsp;<code>k</code>&nbsp;。</p>
2424

25-
<p>一个子序列的 <strong>能量</strong>&nbsp;定义为子序列中&nbsp;<strong>任意</strong>&nbsp;两个元素的差值绝对值的 <strong>最小值</strong>&nbsp;。</p>
25+
<p>一个 <span data-keyword="subsequence-array">子序列</span> 的 <strong>能量</strong>&nbsp;定义为子序列中&nbsp;<strong>任意</strong>&nbsp;两个元素的差值绝对值的 <strong>最小值</strong>&nbsp;。</p>
2626

2727
<p>请你返回 <code>nums</code>&nbsp;中长度 <strong>等于</strong>&nbsp;<code>k</code>&nbsp;的 <strong>所有</strong>&nbsp;子序列的 <strong>能量和</strong>&nbsp;。</p>
2828

solution/3200-3299/3212.Count Submatrices With Equal Frequency of X and Y/README_EN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ tags:
1818

1919
<!-- description:start -->
2020

21-
<p>Given a 2D character matrix <code>grid</code>, where <code>grid[i][j]</code> is either <code>&#39;X&#39;</code>, <code>&#39;Y&#39;</code>, or <code>&#39;.&#39;</code>, return the number of <span data-keyword="submatrix">submatrices</span> that contains:</p>
21+
<p>Given a 2D character matrix <code>grid</code>, where <code>grid[i][j]</code> is either <code>&#39;X&#39;</code>, <code>&#39;Y&#39;</code>, or <code>&#39;.&#39;</code>, return the number of <span data-keyword="submatrix">submatrices</span> that contain:</p>
2222

2323
<ul>
2424
<li><code>grid[0][0]</code></li>

solution/CONTEST_README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ comments: true
2626

2727
## 往期竞赛
2828

29-
#### 第 405 场周赛(2024-07-07 10:30, 90 分钟) 参赛人数 3239
29+
#### 第 405 场周赛(2024-07-07 10:30, 90 分钟) 参赛人数 3240
3030

3131
- [3210. 找出加密后的字符串](/solution/3200-3299/3210.Find%20the%20Encrypted%20String/README.md)
3232
- [3211. 生成不含相邻零的二进制字符串](/solution/3200-3299/3211.Generate%20Binary%20Strings%20Without%20Adjacent%20Zeros/README.md)
@@ -145,7 +145,7 @@ comments: true
145145
- [3129. 找出所有稳定的二进制数组 I](/solution/3100-3199/3129.Find%20All%20Possible%20Stable%20Binary%20Arrays%20I/README.md)
146146
- [3130. 找出所有稳定的二进制数组 II](/solution/3100-3199/3130.Find%20All%20Possible%20Stable%20Binary%20Arrays%20II/README.md)
147147

148-
#### 第 394 场周赛(2024-04-21 10:30, 90 分钟) 参赛人数 3957
148+
#### 第 394 场周赛(2024-04-21 10:30, 90 分钟) 参赛人数 3958
149149

150150
- [3120. 统计特殊字母的数量 I](/solution/3100-3199/3120.Count%20the%20Number%20of%20Special%20Characters%20I/README.md)
151151
- [3121. 统计特殊字母的数量 II](/solution/3100-3199/3121.Count%20the%20Number%20of%20Special%20Characters%20II/README.md)

0 commit comments

Comments
 (0)