Skip to content

Commit 57da1fc

Browse files
authored
feat: add weekly contest 487 (#5003)
1 parent 0efe62c commit 57da1fc

63 files changed

Lines changed: 4028 additions & 17 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
- [乘积小于 K 的子数组](/solution/0700-0799/0713.Subarray%20Product%20Less%20Than%20K/README.md) - `双指针`
5353
- [位 1 的个数](/solution/0100-0199/0191.Number%20of%201%20Bits/README.md) - `位运算``lowbit`
5454
- [合并区间](/solution/0000-0099/0056.Merge%20Intervals/README.md) - `区间合并`
55-
<!-- 排序算法、待补充 -->
55+
<!-- 排序算法、待补充 -->
5656

5757
### 2. 数据结构
5858

solution/0700-0799/0755.Pour Water/README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ tags:
5050
# w #
5151
## # ###
5252
#########
53-
0123456
53+
0123456
5454

5555
当向左或向右移动时,水可以移动到相同或更低的高度。When moving left or right, the water can only move to the same level or a lower level.
5656
(从水平上看,意思是该列的地形高度加上水的高度)
@@ -61,15 +61,15 @@ tags:
6161
# #
6262
## w# ###
6363
#########
64-
0123456
64+
0123456
6565

6666
由于向左移动不会使其降落,所以停在该位置上。下一个水滴下落:
6767

6868
# #
6969
# w #
7070
## w# ###
7171
#########
72-
0123456
72+
0123456
7373

7474

7575
由于新水滴向左移动可以最终下落,因此向左移动。
@@ -81,13 +81,13 @@ tags:
8181
# w #
8282
## w# ###
8383
#########
84-
0123456
84+
0123456
8585

8686
# #
8787
# #
8888
##ww# ###
8989
#########
90-
0123456
90+
0123456
9191

9292
经过刚才的阶段后,第三个水滴下落。
9393
由于向左移动不会最终下落,因此尝试向右移动。
@@ -98,13 +98,13 @@ tags:
9898
# w #
9999
##ww# ###
100100
#########
101-
0123456
101+
0123456
102102

103103
# #
104104
# #
105105
##ww#w###
106106
#########
107-
0123456
107+
0123456
108108

109109
最终,第四个水滴下落。
110110
由于向左移动不会最终下落,因此尝试向右移动。
@@ -114,14 +114,14 @@ tags:
114114
# w #
115115
##ww#w###
116116
#########
117-
0123456
117+
0123456
118118

119119
最终的答案为 [2,2,2,3,2,2,2]:
120120

121-
#
122-
#######
123-
#######
124-
0123456
121+
#
122+
#######
123+
#######
124+
0123456
125125
</pre>
126126

127127
<p><strong>示例 2:</strong></p>

solution/2900-2999/2976.Minimum Cost to Convert String I/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ tags:
5353
<strong>输入:</strong>source = "aaaa", target = "bbbb", original = ["a","c"], changed = ["c","b"], cost = [1,2]
5454
<strong>输出:</strong>12
5555
<strong>解释:</strong>要将字符 'a' 更改为 'b':
56-
- 将字符 'a' 更改为 'c',成本为 1
57-
- 将字符 'c' 更改为 'b',成本为 2
56+
- 将字符 'a' 更改为 'c',成本为 1
57+
- 将字符 'c' 更改为 'b',成本为 2
5858
产生的总成本是 1 + 2 = 3。
5959
将所有 'a' 更改为 'b',产生的总成本是 3 * 4 = 12 。
6060
</pre>

solution/3800-3899/3818.Minimum Prefix Removal to Make Array Strictly Increasing/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
comments: true
33
difficulty: 中等
44
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3800-3899/3818.Minimum%20Prefix%20Removal%20to%20Make%20Array%20Strictly%20Increasing/README.md
5+
rating: 1206
6+
source: 第 486 场周赛 Q1
57
---
68

79
<!-- problem:start -->

solution/3800-3899/3818.Minimum Prefix Removal to Make Array Strictly Increasing/README_EN.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
comments: true
33
difficulty: Medium
44
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3800-3899/3818.Minimum%20Prefix%20Removal%20to%20Make%20Array%20Strictly%20Increasing/README_EN.md
5+
rating: 1206
6+
source: Weekly Contest 486 Q1
57
---
68

79
<!-- problem:start -->

solution/3800-3899/3819.Rotate Non Negative Elements/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
comments: true
33
difficulty: 中等
44
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3800-3899/3819.Rotate%20Non%20Negative%20Elements/README.md
5+
rating: 1381
6+
source: 第 486 场周赛 Q2
57
---
68

79
<!-- problem:start -->

solution/3800-3899/3819.Rotate Non Negative Elements/README_EN.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
comments: true
33
difficulty: Medium
44
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3800-3899/3819.Rotate%20Non%20Negative%20Elements/README_EN.md
5+
rating: 1381
6+
source: Weekly Contest 486 Q2
57
---
68

79
<!-- problem:start -->

solution/3800-3899/3820.Pythagorean Distance Nodes in a Tree/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
comments: true
33
difficulty: 中等
44
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3800-3899/3820.Pythagorean%20Distance%20Nodes%20in%20a%20Tree/README.md
5+
rating: 1725
6+
source: 第 486 场周赛 Q3
57
---
68

79
<!-- problem:start -->

solution/3800-3899/3820.Pythagorean Distance Nodes in a Tree/README_EN.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
comments: true
33
difficulty: Medium
44
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3800-3899/3820.Pythagorean%20Distance%20Nodes%20in%20a%20Tree/README_EN.md
5+
rating: 1725
6+
source: Weekly Contest 486 Q3
57
---
68

79
<!-- problem:start -->

solution/3800-3899/3821.Find Nth Smallest Integer With K One Bits/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
comments: true
33
difficulty: 困难
44
edit_url: https://github.com/doocs/leetcode/edit/main/solution/3800-3899/3821.Find%20Nth%20Smallest%20Integer%20With%20K%20One%20Bits/README.md
5+
rating: 2069
6+
source: 第 486 场周赛 Q4
57
---
68

79
<!-- problem:start -->

0 commit comments

Comments
 (0)