diff --git a/solution/10000-10099/10031.Count the Number of Incremovable Subarrays I/README.md b/solution/2900-2999/2970.Count the Number of Incremovable Subarrays I/README.md
similarity index 90%
rename from solution/10000-10099/10031.Count the Number of Incremovable Subarrays I/README.md
rename to solution/2900-2999/2970.Count the Number of Incremovable Subarrays I/README.md
index 5052a2c5474b8..f5d679e62ba7c 100644
--- a/solution/10000-10099/10031.Count the Number of Incremovable Subarrays I/README.md
+++ b/solution/2900-2999/2970.Count the Number of Incremovable Subarrays I/README.md
@@ -1,6 +1,6 @@
-# [10031. 统计移除递增子数组的数目 I](https://leetcode.cn/problems/count-the-number-of-incremovable-subarrays-i)
+# [2970. 统计移除递增子数组的数目 I](https://leetcode.cn/problems/count-the-number-of-incremovable-subarrays-i)
-[English Version](/solution/10000-10099/10031.Count%20the%20Number%20of%20Incremovable%20Subarrays%20I/README_EN.md)
+[English Version](/solution/2900-2999/2970.Count%20the%20Number%20of%20Incremovable%20Subarrays%20I/README_EN.md)
## 题目描述
diff --git a/solution/10000-10099/10031.Count the Number of Incremovable Subarrays I/README_EN.md b/solution/2900-2999/2970.Count the Number of Incremovable Subarrays I/README_EN.md
similarity index 90%
rename from solution/10000-10099/10031.Count the Number of Incremovable Subarrays I/README_EN.md
rename to solution/2900-2999/2970.Count the Number of Incremovable Subarrays I/README_EN.md
index 73c51d2512bf1..ee448266153f3 100644
--- a/solution/10000-10099/10031.Count the Number of Incremovable Subarrays I/README_EN.md
+++ b/solution/2900-2999/2970.Count the Number of Incremovable Subarrays I/README_EN.md
@@ -1,6 +1,6 @@
-# [10031. Count the Number of Incremovable Subarrays I](https://leetcode.com/problems/count-the-number-of-incremovable-subarrays-i)
+# [2970. Count the Number of Incremovable Subarrays I](https://leetcode.com/problems/count-the-number-of-incremovable-subarrays-i)
-[中文文档](/solution/10000-10099/10031.Count%20the%20Number%20of%20Incremovable%20Subarrays%20I/README.md)
+[中文文档](/solution/2900-2999/2970.Count%20the%20Number%20of%20Incremovable%20Subarrays%20I/README.md)
## Description
diff --git a/solution/10000-10099/10032.Find Polygon With the Largest Perimeter/README.md b/solution/2900-2999/2971.Find Polygon With the Largest Perimeter/README.md
similarity index 92%
rename from solution/10000-10099/10032.Find Polygon With the Largest Perimeter/README.md
rename to solution/2900-2999/2971.Find Polygon With the Largest Perimeter/README.md
index 82134d9808f7f..10b0c7313d2b3 100644
--- a/solution/10000-10099/10032.Find Polygon With the Largest Perimeter/README.md
+++ b/solution/2900-2999/2971.Find Polygon With the Largest Perimeter/README.md
@@ -1,6 +1,6 @@
-# [10032. 找到最大周长的多边形](https://leetcode.cn/problems/find-polygon-with-the-largest-perimeter)
+# [2971. 找到最大周长的多边形](https://leetcode.cn/problems/find-polygon-with-the-largest-perimeter)
-[English Version](/solution/10000-10099/10032.Find%20Polygon%20With%20the%20Largest%20Perimeter/README_EN.md)
+[English Version](/solution/2900-2999/2971.Find%20Polygon%20With%20the%20Largest%20Perimeter/README_EN.md)
## 题目描述
diff --git a/solution/10000-10099/10032.Find Polygon With the Largest Perimeter/README_EN.md b/solution/2900-2999/2971.Find Polygon With the Largest Perimeter/README_EN.md
similarity index 92%
rename from solution/10000-10099/10032.Find Polygon With the Largest Perimeter/README_EN.md
rename to solution/2900-2999/2971.Find Polygon With the Largest Perimeter/README_EN.md
index b6ed1d3532517..c5cf4e2076e08 100644
--- a/solution/10000-10099/10032.Find Polygon With the Largest Perimeter/README_EN.md
+++ b/solution/2900-2999/2971.Find Polygon With the Largest Perimeter/README_EN.md
@@ -1,6 +1,6 @@
-# [10032. Find Polygon With the Largest Perimeter](https://leetcode.com/problems/find-polygon-with-the-largest-perimeter)
+# [2971. Find Polygon With the Largest Perimeter](https://leetcode.com/problems/find-polygon-with-the-largest-perimeter)
-[中文文档](/solution/10000-10099/10032.Find%20Polygon%20With%20the%20Largest%20Perimeter/README.md)
+[中文文档](/solution/2900-2999/2971.Find%20Polygon%20With%20the%20Largest%20Perimeter/README.md)
## Description
diff --git a/solution/10000-10099/10033.Count the Number of Incremovable Subarrays II/README.md b/solution/2900-2999/2972.Count the Number of Incremovable Subarrays II/README.md
similarity index 90%
rename from solution/10000-10099/10033.Count the Number of Incremovable Subarrays II/README.md
rename to solution/2900-2999/2972.Count the Number of Incremovable Subarrays II/README.md
index 8e3d272377d9d..5ad5420d994a3 100644
--- a/solution/10000-10099/10033.Count the Number of Incremovable Subarrays II/README.md
+++ b/solution/2900-2999/2972.Count the Number of Incremovable Subarrays II/README.md
@@ -1,6 +1,6 @@
-# [10033. 统计移除递增子数组的数目 II](https://leetcode.cn/problems/count-the-number-of-incremovable-subarrays-ii)
+# [2972. 统计移除递增子数组的数目 II](https://leetcode.cn/problems/count-the-number-of-incremovable-subarrays-ii)
-[English Version](/solution/10000-10099/10033.Count%20the%20Number%20of%20Incremovable%20Subarrays%20II/README_EN.md)
+[English Version](/solution/2900-2999/2972.Count%20the%20Number%20of%20Incremovable%20Subarrays%20II/README_EN.md)
## 题目描述
diff --git a/solution/10000-10099/10033.Count the Number of Incremovable Subarrays II/README_EN.md b/solution/2900-2999/2972.Count the Number of Incremovable Subarrays II/README_EN.md
similarity index 90%
rename from solution/10000-10099/10033.Count the Number of Incremovable Subarrays II/README_EN.md
rename to solution/2900-2999/2972.Count the Number of Incremovable Subarrays II/README_EN.md
index 26403a6c7035b..8e94f2be7fce9 100644
--- a/solution/10000-10099/10033.Count the Number of Incremovable Subarrays II/README_EN.md
+++ b/solution/2900-2999/2972.Count the Number of Incremovable Subarrays II/README_EN.md
@@ -1,6 +1,6 @@
-# [10033. Count the Number of Incremovable Subarrays II](https://leetcode.com/problems/count-the-number-of-incremovable-subarrays-ii)
+# [2972. Count the Number of Incremovable Subarrays II](https://leetcode.com/problems/count-the-number-of-incremovable-subarrays-ii)
-[中文文档](/solution/10000-10099/10033.Count%20the%20Number%20of%20Incremovable%20Subarrays%20II/README.md)
+[中文文档](/solution/2900-2999/2972.Count%20the%20Number%20of%20Incremovable%20Subarrays%20II/README.md)
## Description
diff --git a/solution/10000-10099/10034.Find Number of Coins to Place in Tree Nodes/README.md b/solution/2900-2999/2973.Find Number of Coins to Place in Tree Nodes/README.md
similarity index 83%
rename from solution/10000-10099/10034.Find Number of Coins to Place in Tree Nodes/README.md
rename to solution/2900-2999/2973.Find Number of Coins to Place in Tree Nodes/README.md
index be16654bda485..88f9b1a6d6f99 100644
--- a/solution/10000-10099/10034.Find Number of Coins to Place in Tree Nodes/README.md
+++ b/solution/2900-2999/2973.Find Number of Coins to Place in Tree Nodes/README.md
@@ -1,6 +1,6 @@
-# [10034. 树中每个节点放置的金币数目](https://leetcode.cn/problems/find-number-of-coins-to-place-in-tree-nodes)
+# [2973. 树中每个节点放置的金币数目](https://leetcode.cn/problems/find-number-of-coins-to-place-in-tree-nodes)
-[English Version](/solution/10000-10099/10034.Find%20Number%20of%20Coins%20to%20Place%20in%20Tree%20Nodes/README_EN.md)
+[English Version](/solution/2900-2999/2973.Find%20Number%20of%20Coins%20to%20Place%20in%20Tree%20Nodes/README_EN.md)
## 题目描述
@@ -23,7 +23,7 @@
示例 1:
-
+
输入:edges = [[0,1],[0,2],[0,3],[0,4],[0,5]], cost = [1,2,3,4,5,6]
@@ -33,7 +33,7 @@
示例 2:
-
+
输入:edges = [[0,1],[0,2],[1,3],[1,4],[1,5],[2,6],[2,7],[2,8]], cost = [1,4,2,3,5,7,8,-4,2]
@@ -47,7 +47,7 @@
示例 3:
-
+
输入:edges = [[0,1],[0,2]], cost = [1,2,-2]
diff --git a/solution/10000-10099/10034.Find Number of Coins to Place in Tree Nodes/README_EN.md b/solution/2900-2999/2973.Find Number of Coins to Place in Tree Nodes/README_EN.md
similarity index 81%
rename from solution/10000-10099/10034.Find Number of Coins to Place in Tree Nodes/README_EN.md
rename to solution/2900-2999/2973.Find Number of Coins to Place in Tree Nodes/README_EN.md
index 39a5e9eeb1ff3..999fed7da5917 100644
--- a/solution/10000-10099/10034.Find Number of Coins to Place in Tree Nodes/README_EN.md
+++ b/solution/2900-2999/2973.Find Number of Coins to Place in Tree Nodes/README_EN.md
@@ -1,6 +1,6 @@
-# [10034. Find Number of Coins to Place in Tree Nodes](https://leetcode.com/problems/find-number-of-coins-to-place-in-tree-nodes)
+# [2973. Find Number of Coins to Place in Tree Nodes](https://leetcode.com/problems/find-number-of-coins-to-place-in-tree-nodes)
-[中文文档](/solution/10000-10099/10034.Find%20Number%20of%20Coins%20to%20Place%20in%20Tree%20Nodes/README.md)
+[中文文档](/solution/2900-2999/2973.Find%20Number%20of%20Coins%20to%20Place%20in%20Tree%20Nodes/README.md)
## Description
@@ -19,7 +19,7 @@
Example 1:
-
+
Input: edges = [[0,1],[0,2],[0,3],[0,4],[0,5]], cost = [1,2,3,4,5,6]
Output: [120,1,1,1,1,1]
@@ -27,7 +27,7 @@
Example 2:
-
+
Input: edges = [[0,1],[0,2],[1,3],[1,4],[1,5],[2,6],[2,7],[2,8]], cost = [1,4,2,3,5,7,8,-4,2]
Output: [280,140,32,1,1,1,1,1,1]
@@ -39,7 +39,7 @@
Example 3:
-
+
Input: edges = [[0,1],[0,2]], cost = [1,2,-2]
Output: [0,1,1]
diff --git a/solution/10000-10099/10034.Find Number of Coins to Place in Tree Nodes/images/screenshot-2023-11-10-012513.png b/solution/2900-2999/2973.Find Number of Coins to Place in Tree Nodes/images/screenshot-2023-11-10-012513.png
similarity index 100%
rename from solution/10000-10099/10034.Find Number of Coins to Place in Tree Nodes/images/screenshot-2023-11-10-012513.png
rename to solution/2900-2999/2973.Find Number of Coins to Place in Tree Nodes/images/screenshot-2023-11-10-012513.png
diff --git a/solution/10000-10099/10034.Find Number of Coins to Place in Tree Nodes/images/screenshot-2023-11-10-012614.png b/solution/2900-2999/2973.Find Number of Coins to Place in Tree Nodes/images/screenshot-2023-11-10-012614.png
similarity index 100%
rename from solution/10000-10099/10034.Find Number of Coins to Place in Tree Nodes/images/screenshot-2023-11-10-012614.png
rename to solution/2900-2999/2973.Find Number of Coins to Place in Tree Nodes/images/screenshot-2023-11-10-012614.png
diff --git a/solution/10000-10099/10034.Find Number of Coins to Place in Tree Nodes/images/screenshot-2023-11-10-012641.png b/solution/2900-2999/2973.Find Number of Coins to Place in Tree Nodes/images/screenshot-2023-11-10-012641.png
similarity index 100%
rename from solution/10000-10099/10034.Find Number of Coins to Place in Tree Nodes/images/screenshot-2023-11-10-012641.png
rename to solution/2900-2999/2973.Find Number of Coins to Place in Tree Nodes/images/screenshot-2023-11-10-012641.png
diff --git a/solution/2900-2999/2974.Minimum Number Game/README.md b/solution/2900-2999/2974.Minimum Number Game/README.md
new file mode 100644
index 0000000000000..7d8f07198dfa5
--- /dev/null
+++ b/solution/2900-2999/2974.Minimum Number Game/README.md
@@ -0,0 +1,88 @@
+# [2974. 最小数字游戏](https://leetcode.cn/problems/minimum-number-game)
+
+[English Version](/solution/2900-2999/2974.Minimum%20Number%20Game/README_EN.md)
+
+## 题目描述
+
+
+
+你有一个下标从 0 开始、长度为 偶数 的整数数组 nums
,同时还有一个空数组 arr
。Alice 和 Bob 决定玩一个游戏,游戏中每一轮 Alice 和 Bob 都会各自执行一次操作。游戏规则如下:
+
+
+ - 每一轮,Alice 先从
nums
中移除一个 最小 元素,然后 Bob 执行同样的操作。
+ - 接着,Bob 会将移除的元素添加到数组
arr
中,然后 Alice 也执行同样的操作。
+ - 游戏持续进行,直到
nums
变为空。
+
+
+返回结果数组 arr
。
+
+
+
+示例 1:
+
+
+输入:nums = [5,4,2,3]
+输出:[3,2,5,4]
+解释:第一轮,Alice 先移除 2 ,然后 Bob 移除 3 。然后 Bob 先将 3 添加到 arr 中,接着 Alice 再将 2 添加到 arr 中。于是 arr = [3,2] 。
+第二轮开始时,nums = [5,4] 。Alice 先移除 4 ,然后 Bob 移除 5 。接着他们都将元素添加到 arr 中,arr 变为 [3,2,5,4] 。
+
+
+示例 2:
+
+
+输入:nums = [2,5]
+输出:[5,2]
+解释:第一轮,Alice 先移除 2 ,然后 Bob 移除 5 。然后 Bob 先将 5 添加到 arr 中,接着 Alice 再将 2 添加到 arr 中。于是 arr = [5,2] 。
+
+
+
+
+提示:
+
+
+ 1 <= nums.length <= 100
+ 1 <= nums[i] <= 100
+ nums.length % 2 == 0
+
+
+## 解法
+
+
+
+
+
+### **Python3**
+
+
+
+```python
+
+```
+
+### **Java**
+
+
+
+```java
+
+```
+
+### **C++**
+
+```cpp
+
+```
+
+### **Go**
+
+```go
+
+```
+
+### **...**
+
+```
+
+```
+
+
diff --git a/solution/2900-2999/2974.Minimum Number Game/README_EN.md b/solution/2900-2999/2974.Minimum Number Game/README_EN.md
new file mode 100644
index 0000000000000..d8a36fe3a6a22
--- /dev/null
+++ b/solution/2900-2999/2974.Minimum Number Game/README_EN.md
@@ -0,0 +1,78 @@
+# [2974. Minimum Number Game](https://leetcode.com/problems/minimum-number-game)
+
+[中文文档](/solution/2900-2999/2974.Minimum%20Number%20Game/README.md)
+
+## Description
+
+You are given a 0-indexed integer array nums
of even length and there is also an empty array arr
. Alice and Bob decided to play a game where in every round Alice and Bob will do one move. The rules of the game are as follows:
+
+
+ - Every round, first Alice will remove the minimum element from
nums
, and then Bob does the same.
+ - Now, first Bob will append the removed element in the array
arr
, and then Alice does the same.
+ - The game continues until
nums
becomes empty.
+
+
+Return the resulting array arr
.
+
+
+Example 1:
+
+
+Input: nums = [5,4,2,3]
+Output: [3,2,5,4]
+Explanation: In round one, first Alice removes 2 and then Bob removes 3. Then in arr firstly Bob appends 3 and then Alice appends 2. So arr = [3,2].
+At the begining of round two, nums = [5,4]. Now, first Alice removes 4 and then Bob removes 5. Then both append in arr which becomes [3,2,5,4].
+
+
+Example 2:
+
+
+Input: nums = [2,5]
+Output: [5,2]
+Explanation: In round one, first Alice removes 2 and then Bob removes 5. Then in arr firstly Bob appends and then Alice appends. So arr = [5,2].
+
+
+
+Constraints:
+
+
+ 1 <= nums.length <= 100
+ 1 <= nums[i] <= 100
+ nums.length % 2 == 0
+
+
+## Solutions
+
+
+
+### **Python3**
+
+```python
+
+```
+
+### **Java**
+
+```java
+
+```
+
+### **C++**
+
+```cpp
+
+```
+
+### **Go**
+
+```go
+
+```
+
+### **...**
+
+```
+
+```
+
+
diff --git a/solution/2900-2999/2975.Maximum Square Area by Removing Fences From a Field/README.md b/solution/2900-2999/2975.Maximum Square Area by Removing Fences From a Field/README.md
new file mode 100644
index 0000000000000..e96298a7c7a41
--- /dev/null
+++ b/solution/2900-2999/2975.Maximum Square Area by Removing Fences From a Field/README.md
@@ -0,0 +1,93 @@
+# [2975. 移除栅栏得到的正方形田地的最大面积](https://leetcode.cn/problems/maximum-square-area-by-removing-fences-from-a-field)
+
+[English Version](/solution/2900-2999/2975.Maximum%20Square%20Area%20by%20Removing%20Fences%20From%20a%20Field/README_EN.md)
+
+## 题目描述
+
+
+
+有一个大型的 (m - 1) x (n - 1)
矩形田地,其两个对角分别是 (1, 1)
和 (m, n)
,田地内部有一些水平栅栏和垂直栅栏,分别由数组 hFences
和 vFences
给出。
+
+水平栅栏为坐标 (hFences[i], 1)
到 (hFences[i], n)
,垂直栅栏为坐标 (1, vFences[i])
到 (m, vFences[i])
。
+
+返回通过 移除 一些栅栏(可能不移除)所能形成的最大面积的 正方形 田地的面积,或者如果无法形成正方形田地则返回 -1
。
+
+由于答案可能很大,所以请返回结果对 109 + 7
取余 后的值。
+
+注意:田地外围两个水平栅栏(坐标 (1, 1)
到 (1, n)
和坐标 (m, 1)
到 (m, n)
)以及两个垂直栅栏(坐标 (1, 1)
到 (m, 1)
和坐标 (1, n)
到 (m, n)
)所包围。这些栅栏 不能 被移除。
+
+
+
+示例 1:
+
+
+
+
+输入:m = 4, n = 3, hFences = [2,3], vFences = [2]
+输出:4
+解释:移除位于 2 的水平栅栏和位于 2 的垂直栅栏将得到一个面积为 4 的正方形田地。
+
+
+示例 2:
+
+
+
+
+输入:m = 6, n = 7, hFences = [2], vFences = [4]
+输出:-1
+解释:可以证明无法通过移除栅栏形成正方形田地。
+
+
+
+
+提示:
+
+
+ 3 <= m, n <= 109
+ 1 <= hFences.length, vFences.length <= 600
+ 1 < hFences[i] < m
+ 1 < vFences[i] < n
+ hFences
和 vFences
中的元素是唯一的。
+
+
+## 解法
+
+
+
+
+
+### **Python3**
+
+
+
+```python
+
+```
+
+### **Java**
+
+
+
+```java
+
+```
+
+### **C++**
+
+```cpp
+
+```
+
+### **Go**
+
+```go
+
+```
+
+### **...**
+
+```
+
+```
+
+
diff --git a/solution/2900-2999/2975.Maximum Square Area by Removing Fences From a Field/README_EN.md b/solution/2900-2999/2975.Maximum Square Area by Removing Fences From a Field/README_EN.md
new file mode 100644
index 0000000000000..e7b8403134b6c
--- /dev/null
+++ b/solution/2900-2999/2975.Maximum Square Area by Removing Fences From a Field/README_EN.md
@@ -0,0 +1,83 @@
+# [2975. Maximum Square Area by Removing Fences From a Field](https://leetcode.com/problems/maximum-square-area-by-removing-fences-from-a-field)
+
+[中文文档](/solution/2900-2999/2975.Maximum%20Square%20Area%20by%20Removing%20Fences%20From%20a%20Field/README.md)
+
+## Description
+
+There is a large (m - 1) x (n - 1)
rectangular field with corners at (1, 1)
and (m, n)
containing some horizontal and vertical fences given in arrays hFences
and vFences
respectively.
+
+Horizontal fences are from the coordinates (hFences[i], 1)
to (hFences[i], n)
and vertical fences are from the coordinates (1, vFences[i])
to (m, vFences[i])
.
+
+Return the maximum area of a square field that can be formed by removing some fences (possibly none) or -1
if it is impossible to make a square field.
+
+Since the answer may be large, return it modulo 109 + 7
.
+
+Note: The field is surrounded by two horizontal fences from the coordinates (1, 1)
to (1, n)
and (m, 1)
to (m, n)
and two vertical fences from the coordinates (1, 1)
to (m, 1)
and (1, n)
to (m, n)
. These fences cannot be removed.
+
+
+Example 1:
+
+
+
+
+Input: m = 4, n = 3, hFences = [2,3], vFences = [2]
+Output: 4
+Explanation: Removing the horizontal fence at 2 and the vertical fence at 2 will give a square field of area 4.
+
+
+Example 2:
+
+
+
+
+Input: m = 6, n = 7, hFences = [2], vFences = [4]
+Output: -1
+Explanation: It can be proved that there is no way to create a square field by removing fences.
+
+
+
+Constraints:
+
+
+ 3 <= m, n <= 109
+ 1 <= hFences.length, vFences.length <= 600
+ 1 < hFences[i] < m
+ 1 < vFences[i] < n
+ hFences
and vFences
are unique.
+
+
+## Solutions
+
+
+
+### **Python3**
+
+```python
+
+```
+
+### **Java**
+
+```java
+
+```
+
+### **C++**
+
+```cpp
+
+```
+
+### **Go**
+
+```go
+
+```
+
+### **...**
+
+```
+
+```
+
+
diff --git a/solution/2900-2999/2975.Maximum Square Area by Removing Fences From a Field/images/maxsquareareaexample1.png b/solution/2900-2999/2975.Maximum Square Area by Removing Fences From a Field/images/maxsquareareaexample1.png
new file mode 100644
index 0000000000000..f7dd957fc145e
Binary files /dev/null and b/solution/2900-2999/2975.Maximum Square Area by Removing Fences From a Field/images/maxsquareareaexample1.png differ
diff --git a/solution/2900-2999/2975.Maximum Square Area by Removing Fences From a Field/images/screenshot-from-2023-11-05-22-40-25.png b/solution/2900-2999/2975.Maximum Square Area by Removing Fences From a Field/images/screenshot-from-2023-11-05-22-40-25.png
new file mode 100644
index 0000000000000..c9fcb790c7bf0
Binary files /dev/null and b/solution/2900-2999/2975.Maximum Square Area by Removing Fences From a Field/images/screenshot-from-2023-11-05-22-40-25.png differ
diff --git a/solution/2900-2999/2976.Minimum Cost to Convert String I/README.md b/solution/2900-2999/2976.Minimum Cost to Convert String I/README.md
new file mode 100644
index 0000000000000..fe27f76bd32b0
--- /dev/null
+++ b/solution/2900-2999/2976.Minimum Cost to Convert String I/README.md
@@ -0,0 +1,108 @@
+# [2976. 转换字符串的最小成本 I](https://leetcode.cn/problems/minimum-cost-to-convert-string-i)
+
+[English Version](/solution/2900-2999/2976.Minimum%20Cost%20to%20Convert%20String%20I/README_EN.md)
+
+## 题目描述
+
+
+
+给你两个下标从 0 开始的字符串 source
和 target
,它们的长度均为 n
并且由 小写 英文字母组成。
+
+另给你两个下标从 0 开始的字符数组 original
和 changed
,以及一个整数数组 cost
,其中 cost[i]
代表将字符 original[i]
更改为字符 changed[i]
的成本。
+
+你从字符串 source
开始。在一次操作中,如果 存在 任意 下标 j
满足 cost[j] == z
、original[j] == x
以及 changed[j] == y
。你就可以选择字符串中的一个字符 x
并以 z
的成本将其更改为字符 y
。
+
+返回将字符串 source
转换为字符串 target
所需的 最小 成本。如果不可能完成转换,则返回 -1
。
+
+注意,可能存在下标 i
、j
使得 original[j] == original[i]
且 changed[j] == changed[i]
。
+
+
+
+示例 1:
+
+
+输入:source = "abcd", target = "acbe", original = ["a","b","c","c","e","d"], changed = ["b","c","b","e","b","e"], cost = [2,5,5,1,2,20]
+输出:28
+解释:将字符串 "abcd" 转换为字符串 "acbe" :
+- 更改下标 1 处的值 'b' 为 'c' ,成本为 5 。
+- 更改下标 2 处的值 'c' 为 'e' ,成本为 1 。
+- 更改下标 2 处的值 'e' 为 'b' ,成本为 2 。
+- 更改下标 3 处的值 'd' 为 'e' ,成本为 20 。
+产生的总成本是 5 + 1 + 2 + 20 = 28 。
+可以证明这是可能的最小成本。
+
+
+示例 2:
+
+
+输入:source = "aaaa", target = "bbbb", original = ["a","c"], changed = ["c","b"], cost = [1,2]
+输出:12
+解释:要将字符 'a' 更改为 'b':
+- 将字符 'a' 更改为 'c',成本为 1
+- 将字符 'c' 更改为 'b',成本为 2
+产生的总成本是 1 + 2 = 3。
+将所有 'a' 更改为 'b',产生的总成本是 3 * 4 = 12 。
+
+
+示例 3:
+
+
+输入:source = "abcd", target = "abce", original = ["a"], changed = ["e"], cost = [10000]
+输出:-1
+解释:无法将 source 字符串转换为 target 字符串,因为下标 3 处的值无法从 'd' 更改为 'e' 。
+
+
+
+
+提示:
+
+
+ 1 <= source.length == target.length <= 105
+ source
、target
均由小写英文字母组成
+ 1 <= cost.length== original.length == changed.length <= 2000
+ original[i]
、changed[i]
是小写英文字母
+ 1 <= cost[i] <= 106
+ original[i] != changed[i]
+
+
+## 解法
+
+
+
+
+
+### **Python3**
+
+
+
+```python
+
+```
+
+### **Java**
+
+
+
+```java
+
+```
+
+### **C++**
+
+```cpp
+
+```
+
+### **Go**
+
+```go
+
+```
+
+### **...**
+
+```
+
+```
+
+
diff --git a/solution/2900-2999/2976.Minimum Cost to Convert String I/README_EN.md b/solution/2900-2999/2976.Minimum Cost to Convert String I/README_EN.md
new file mode 100644
index 0000000000000..f0f94ab66a4fe
--- /dev/null
+++ b/solution/2900-2999/2976.Minimum Cost to Convert String I/README_EN.md
@@ -0,0 +1,92 @@
+# [2976. Minimum Cost to Convert String I](https://leetcode.com/problems/minimum-cost-to-convert-string-i)
+
+[中文文档](/solution/2900-2999/2976.Minimum%20Cost%20to%20Convert%20String%20I/README.md)
+
+## Description
+
+You are given two 0-indexed strings source
and target
, both of length n
and consisting of lowercase English letters. You are also given two 0-indexed character arrays original
and changed
, and an integer array cost
, where cost[i]
represents the cost of changing the character original[i]
to the character changed[i]
.
+
+You start with the string source
. In one operation, you can pick a character x
from the string and change it to the character y
at a cost of z
if there exists any index j
such that cost[j] == z
, original[j] == x
, and changed[j] == y
.
+
+Return the minimum cost to convert the string source
to the string target
using any number of operations. If it is impossible to convert source
to target
, return -1
.
+
+Note that there may exist indices i
, j
such that original[j] == original[i]
and changed[j] == changed[i]
.
+
+
+Example 1:
+
+
+Input: source = "abcd", target = "acbe", original = ["a","b","c","c","e","d"], changed = ["b","c","b","e","b","e"], cost = [2,5,5,1,2,20]
+Output: 28
+Explanation: To convert the string "abcd" to string "acbe":
+- Change value at index 1 from 'b' to 'c' at a cost of 5.
+- Change value at index 2 from 'c' to 'e' at a cost of 1.
+- Change value at index 2 from 'e' to 'b' at a cost of 2.
+- Change value at index 3 from 'd' to 'e' at a cost of 20.
+The total cost incurred is 5 + 1 + 2 + 20 = 28.
+It can be shown that this is the minimum possible cost.
+
+
+Example 2:
+
+
+Input: source = "aaaa", target = "bbbb", original = ["a","c"], changed = ["c","b"], cost = [1,2]
+Output: 12
+Explanation: To change the character 'a' to 'b' change the character 'a' to 'c' at a cost of 1, followed by changing the character 'c' to 'b' at a cost of 2, for a total cost of 1 + 2 = 3. To change all occurrences of 'a' to 'b', a total cost of 3 * 4 = 12 is incurred.
+
+
+Example 3:
+
+
+Input: source = "abcd", target = "abce", original = ["a"], changed = ["e"], cost = [10000]
+Output: -1
+Explanation: It is impossible to convert source to target because the value at index 3 cannot be changed from 'd' to 'e'.
+
+
+
+Constraints:
+
+
+ 1 <= source.length == target.length <= 105
+ source
, target
consist of lowercase English letters.
+ 1 <= cost.length == original.length == changed.length <= 2000
+ original[i]
, changed[i]
are lowercase English letters.
+ 1 <= cost[i] <= 106
+ original[i] != changed[i]
+
+
+## Solutions
+
+
+
+### **Python3**
+
+```python
+
+```
+
+### **Java**
+
+```java
+
+```
+
+### **C++**
+
+```cpp
+
+```
+
+### **Go**
+
+```go
+
+```
+
+### **...**
+
+```
+
+```
+
+
diff --git a/solution/2900-2999/2977.Minimum Cost to Convert String II/README.md b/solution/2900-2999/2977.Minimum Cost to Convert String II/README.md
new file mode 100644
index 0000000000000..b90c0154faeff
--- /dev/null
+++ b/solution/2900-2999/2977.Minimum Cost to Convert String II/README.md
@@ -0,0 +1,117 @@
+# [2977. 转换字符串的最小成本 II](https://leetcode.cn/problems/minimum-cost-to-convert-string-ii)
+
+[English Version](/solution/2900-2999/2977.Minimum%20Cost%20to%20Convert%20String%20II/README_EN.md)
+
+## 题目描述
+
+
+
+给你两个下标从 0 开始的字符串 source
和 target
,它们的长度均为 n
并且由 小写 英文字母组成。
+
+另给你两个下标从 0 开始的字符串数组 original
和 changed
,以及一个整数数组 cost
,其中 cost[i]
代表将字符串 original[i]
更改为字符串 changed[i]
的成本。
+
+你从字符串 source
开始。在一次操作中,如果 存在 任意 下标 j
满足 cost[j] == z
、original[j] == x
以及 changed[j] == y
,你就可以选择字符串中的 子串 x
并以 z
的成本将其更改为 y
。 你可以执行 任意数量 的操作,但是任两次操作必须满足 以下两个 条件 之一 :
+
+
+ - 在两次操作中选择的子串分别是
source[a..b]
和 source[c..d]
,满足 b < c
或 d < a
。换句话说,两次操作中选择的下标 不相交 。
+ - 在两次操作中选择的子串分别是
source[a..b]
和 source[c..d]
,满足 a == c
且 b == d
。换句话说,两次操作中选择的下标 相同 。
+
+
+返回将字符串 source
转换为字符串 target
所需的 最小 成本。如果不可能完成转换,则返回 -1
。
+
+注意,可能存在下标 i
、j
使得 original[j] == original[i]
且 changed[j] == changed[i]
。
+
+
+
+示例 1:
+
+
+输入:source = "abcd", target = "acbe", original = ["a","b","c","c","e","d"], changed = ["b","c","b","e","b","e"], cost = [2,5,5,1,2,20]
+输出:28
+解释:将 "abcd" 转换为 "acbe",执行以下操作:
+- 将子串 source[1..1] 从 "b" 改为 "c" ,成本为 5 。
+- 将子串 source[2..2] 从 "c" 改为 "e" ,成本为 1 。
+- 将子串 source[2..2] 从 "e" 改为 "b" ,成本为 2 。
+- 将子串 source[3..3] 从 "d" 改为 "e" ,成本为 20 。
+产生的总成本是 5 + 1 + 2 + 20 = 28 。
+可以证明这是可能的最小成本。
+
+
+示例 2:
+
+
+输入:source = "abcdefgh", target = "acdeeghh", original = ["bcd","fgh","thh"], changed = ["cde","thh","ghh"], cost = [1,3,5]
+输出:9
+解释:将 "abcdefgh" 转换为 "acdeeghh",执行以下操作:
+- 将子串 source[1..3] 从 "bcd" 改为 "cde" ,成本为 1 。
+- 将子串 source[5..7] 从 "fgh" 改为 "thh" ,成本为 3 。可以执行此操作,因为下标 [5,7] 与第一次操作选中的下标不相交。
+- 将子串 source[5..7] 从 "thh" 改为 "ghh" ,成本为 5 。可以执行此操作,因为下标 [5,7] 与第一次操作选中的下标不相交,且与第二次操作选中的下标相同。
+产生的总成本是 1 + 3 + 5 = 9 。
+可以证明这是可能的最小成本。
+
+
+示例 3:
+
+
+输入:source = "abcdefgh", target = "addddddd", original = ["bcd","defgh"], changed = ["ddd","ddddd"], cost = [100,1578]
+输出:-1
+解释:无法将 "abcdefgh" 转换为 "addddddd" 。
+如果选择子串 source[1..3] 执行第一次操作,以将 "abcdefgh" 改为 "adddefgh" ,你无法选择子串 source[3..7] 执行第二次操作,因为两次操作有一个共用下标 3 。
+如果选择子串 source[3..7] 执行第一次操作,以将 "abcdefgh" 改为 "abcddddd" ,你无法选择子串 source[1..3] 执行第二次操作,因为两次操作有一个共用下标 3 。
+
+
+
+
+提示:
+
+
+ 1 <= source.length == target.length <= 1000
+ source
、target
均由小写英文字母组成
+ 1 <= cost.length == original.length == changed.length <= 100
+ 1 <= original[i].length == changed[i].length <= source.length
+ original[i]
、changed[i]
均由小写英文字母组成
+ original[i] != changed[i]
+ 1 <= cost[i] <= 106
+
+
+## 解法
+
+
+
+
+
+### **Python3**
+
+
+
+```python
+
+```
+
+### **Java**
+
+
+
+```java
+
+```
+
+### **C++**
+
+```cpp
+
+```
+
+### **Go**
+
+```go
+
+```
+
+### **...**
+
+```
+
+```
+
+
diff --git a/solution/2900-2999/2977.Minimum Cost to Convert String II/README_EN.md b/solution/2900-2999/2977.Minimum Cost to Convert String II/README_EN.md
new file mode 100644
index 0000000000000..4053fc6256e8e
--- /dev/null
+++ b/solution/2900-2999/2977.Minimum Cost to Convert String II/README_EN.md
@@ -0,0 +1,105 @@
+# [2977. Minimum Cost to Convert String II](https://leetcode.com/problems/minimum-cost-to-convert-string-ii)
+
+[中文文档](/solution/2900-2999/2977.Minimum%20Cost%20to%20Convert%20String%20II/README.md)
+
+## Description
+
+You are given two 0-indexed strings source
and target
, both of length n
and consisting of lowercase English characters. You are also given two 0-indexed string arrays original
and changed
, and an integer array cost
, where cost[i]
represents the cost of converting the string original[i]
to the string changed[i]
.
+
+You start with the string source
. In one operation, you can pick a substring x
from the string, and change it to y
at a cost of z
if there exists any index j
such that cost[j] == z
, original[j] == x
, and changed[j] == y
. You are allowed to do any number of operations, but any pair of operations must satisfy either of these two conditions:
+
+
+ - The substrings picked in the operations are
source[a..b]
and source[c..d]
with either b < c
or d < a
. In other words, the indices picked in both operations are disjoint.
+ - The substrings picked in the operations are
source[a..b]
and source[c..d]
with a == c
and b == d
. In other words, the indices picked in both operations are identical.
+
+
+Return the minimum cost to convert the string source
to the string target
using any number of operations. If it is impossible to convert source
to target
, return -1
.
+
+Note that there may exist indices i
, j
such that original[j] == original[i]
and changed[j] == changed[i]
.
+
+
+Example 1:
+
+
+Input: source = "abcd", target = "acbe", original = ["a","b","c","c","e","d"], changed = ["b","c","b","e","b","e"], cost = [2,5,5,1,2,20]
+Output: 28
+Explanation: To convert "abcd" to "acbe", do the following operations:
+- Change substring source[1..1] from "b" to "c" at a cost of 5.
+- Change substring source[2..2] from "c" to "e" at a cost of 1.
+- Change substring source[2..2] from "e" to "b" at a cost of 2.
+- Change substring source[3..3] from "d" to "e" at a cost of 20.
+The total cost incurred is 5 + 1 + 2 + 20 = 28.
+It can be shown that this is the minimum possible cost.
+
+
+Example 2:
+
+
+Input: source = "abcdefgh", target = "acdeeghh", original = ["bcd","fgh","thh"], changed = ["cde","thh","ghh"], cost = [1,3,5]
+Output: 9
+Explanation: To convert "abcdefgh" to "acdeeghh", do the following operations:
+- Change substring source[1..3] from "bcd" to "cde" at a cost of 1.
+- Change substring source[5..7] from "fgh" to "thh" at a cost of 3. We can do this operation because indices [5,7] are disjoint with indices picked in the first operation.
+- Change substring source[5..7] from "thh" to "ghh" at a cost of 5. We can do this operation because indices [5,7] are disjoint with indices picked in the first operation, and identical with indices picked in the second operation.
+The total cost incurred is 1 + 3 + 5 = 9.
+It can be shown that this is the minimum possible cost.
+
+
+Example 3:
+
+
+Input: source = "abcdefgh", target = "addddddd", original = ["bcd","defgh"], changed = ["ddd","ddddd"], cost = [100,1578]
+Output: -1
+Explanation: It is impossible to convert "abcdefgh" to "addddddd".
+If you select substring source[1..3] as the first operation to change "abcdefgh" to "adddefgh", you cannot select substring source[3..7] as the second operation because it has a common index, 3, with the first operation.
+If you select substring source[3..7] as the first operation to change "abcdefgh" to "abcddddd", you cannot select substring source[1..3] as the second operation because it has a common index, 3, with the first operation.
+
+
+
+Constraints:
+
+
+ 1 <= source.length == target.length <= 1000
+ source
, target
consist only of lowercase English characters.
+ 1 <= cost.length == original.length == changed.length <= 100
+ 1 <= original[i].length == changed[i].length <= source.length
+ original[i]
, changed[i]
consist only of lowercase English characters.
+ original[i] != changed[i]
+ 1 <= cost[i] <= 106
+
+
+## Solutions
+
+
+
+### **Python3**
+
+```python
+
+```
+
+### **Java**
+
+```java
+
+```
+
+### **C++**
+
+```cpp
+
+```
+
+### **Go**
+
+```go
+
+```
+
+### **...**
+
+```
+
+```
+
+
diff --git a/solution/CONTEST_README.md b/solution/CONTEST_README.md
index 83bb50b407d12..4c302a2cace2d 100644
--- a/solution/CONTEST_README.md
+++ b/solution/CONTEST_README.md
@@ -22,12 +22,19 @@
## 往期竞赛
+#### 第 377 场周赛(2023-12-24 10:30, 90 分钟) 参赛人数 3148
+
+- [2974. 最小数字游戏](/solution/2900-2999/2974.Minimum%20Number%20Game/README.md)
+- [2975. 移除栅栏得到的正方形田地的最大面积](/solution/2900-2999/2975.Maximum%20Square%20Area%20by%20Removing%20Fences%20From%20a%20Field/README.md)
+- [2976. 转换字符串的最小成本 I](/solution/2900-2999/2976.Minimum%20Cost%20to%20Convert%20String%20I/README.md)
+- [2977. 转换字符串的最小成本 II](/solution/2900-2999/2977.Minimum%20Cost%20to%20Convert%20String%20II/README.md)
+
#### 第 120 场双周赛(2023-12-23 22:30, 90 分钟) 参赛人数 2542
-- [10031. 统计移除递增子数组的数目 I](/solution/10000-10099/10031.Count%20the%20Number%20of%20Incremovable%20Subarrays%20I/README.md)
-- [10032. 找到最大周长的多边形](/solution/10000-10099/10032.Find%20Polygon%20With%20the%20Largest%20Perimeter/README.md)
-- [10033. 统计移除递增子数组的数目 II](/solution/10000-10099/10033.Count%20the%20Number%20of%20Incremovable%20Subarrays%20II/README.md)
-- [10034. 树中每个节点放置的金币数目](/solution/10000-10099/10034.Find%20Number%20of%20Coins%20to%20Place%20in%20Tree%20Nodes/README.md)
+- [2970. 统计移除递增子数组的数目 I](/solution/2900-2999/2970.Count%20the%20Number%20of%20Incremovable%20Subarrays%20I/README.md)
+- [2971. 找到最大周长的多边形](/solution/2900-2999/2971.Find%20Polygon%20With%20the%20Largest%20Perimeter/README.md)
+- [2972. 统计移除递增子数组的数目 II](/solution/2900-2999/2972.Count%20the%20Number%20of%20Incremovable%20Subarrays%20II/README.md)
+- [2973. 树中每个节点放置的金币数目](/solution/2900-2999/2973.Find%20Number%20of%20Coins%20to%20Place%20in%20Tree%20Nodes/README.md)
#### 第 376 场周赛(2023-12-17 10:30, 90 分钟) 参赛人数 3409
diff --git a/solution/CONTEST_README_EN.md b/solution/CONTEST_README_EN.md
index 0379771287386..6f0453b019c1a 100644
--- a/solution/CONTEST_README_EN.md
+++ b/solution/CONTEST_README_EN.md
@@ -25,12 +25,19 @@ Get your rating changes right after the completion of LeetCode contests, https:/
## Past Contests
+#### Weekly Contest 377
+
+- [2974. Minimum Number Game](/solution/2900-2999/2974.Minimum%20Number%20Game/README_EN.md)
+- [2975. Maximum Square Area by Removing Fences From a Field](/solution/2900-2999/2975.Maximum%20Square%20Area%20by%20Removing%20Fences%20From%20a%20Field/README_EN.md)
+- [2976. Minimum Cost to Convert String I](/solution/2900-2999/2976.Minimum%20Cost%20to%20Convert%20String%20I/README_EN.md)
+- [2977. Minimum Cost to Convert String II](/solution/2900-2999/2977.Minimum%20Cost%20to%20Convert%20String%20II/README_EN.md)
+
#### Biweekly Contest 120
-- [10031. Count the Number of Incremovable Subarrays I](/solution/10000-10099/10031.Count%20the%20Number%20of%20Incremovable%20Subarrays%20I/README_EN.md)
-- [10032. Find Polygon With the Largest Perimeter](/solution/10000-10099/10032.Find%20Polygon%20With%20the%20Largest%20Perimeter/README_EN.md)
-- [10033. Count the Number of Incremovable Subarrays II](/solution/10000-10099/10033.Count%20the%20Number%20of%20Incremovable%20Subarrays%20II/README_EN.md)
-- [10034. Find Number of Coins to Place in Tree Nodes](/solution/10000-10099/10034.Find%20Number%20of%20Coins%20to%20Place%20in%20Tree%20Nodes/README_EN.md)
+- [2970. Count the Number of Incremovable Subarrays I](/solution/2900-2999/2970.Count%20the%20Number%20of%20Incremovable%20Subarrays%20I/README_EN.md)
+- [2971. Find Polygon With the Largest Perimeter](/solution/2900-2999/2971.Find%20Polygon%20With%20the%20Largest%20Perimeter/README_EN.md)
+- [2972. Count the Number of Incremovable Subarrays II](/solution/2900-2999/2972.Count%20the%20Number%20of%20Incremovable%20Subarrays%20II/README_EN.md)
+- [2973. Find Number of Coins to Place in Tree Nodes](/solution/2900-2999/2973.Find%20Number%20of%20Coins%20to%20Place%20in%20Tree%20Nodes/README_EN.md)
#### Weekly Contest 376
diff --git a/solution/README.md b/solution/README.md
index 8e0b2f671e77e..6630cac23523d 100644
--- a/solution/README.md
+++ b/solution/README.md
@@ -1014,10 +1014,6 @@
| 1001 | [网格照明](/solution/1000-1099/1001.Grid%20Illumination/README.md) | `数组`,`哈希表` | 困难 | 第 125 场周赛 |
| 1002 | [查找共用字符](/solution/1000-1099/1002.Find%20Common%20Characters/README.md) | `数组`,`哈希表`,`字符串` | 简单 | 第 126 场周赛 |
| 1003 | [检查替换后的词是否有效](/solution/1000-1099/1003.Check%20If%20Word%20Is%20Valid%20After%20Substitutions/README.md) | `栈`,`字符串` | 中等 | 第 126 场周赛 |
-| 10031 | [统计移除递增子数组的数目 I](/solution/10000-10099/10031.Count%20the%20Number%20of%20Incremovable%20Subarrays%20I/README.md) | | 简单 | 第 120 场双周赛 |
-| 10032 | [找到最大周长的多边形](/solution/10000-10099/10032.Find%20Polygon%20With%20the%20Largest%20Perimeter/README.md) | | 中等 | 第 120 场双周赛 |
-| 10033 | [统计移除递增子数组的数目 II](/solution/10000-10099/10033.Count%20the%20Number%20of%20Incremovable%20Subarrays%20II/README.md) | | 困难 | 第 120 场双周赛 |
-| 10034 | [树中每个节点放置的金币数目](/solution/10000-10099/10034.Find%20Number%20of%20Coins%20to%20Place%20in%20Tree%20Nodes/README.md) | | 困难 | 第 120 场双周赛 |
| 1004 | [最大连续1的个数 III](/solution/1000-1099/1004.Max%20Consecutive%20Ones%20III/README.md) | `数组`,`二分查找`,`前缀和`,`滑动窗口` | 中等 | 第 126 场周赛 |
| 1005 | [K 次取反后最大化的数组和](/solution/1000-1099/1005.Maximize%20Sum%20Of%20Array%20After%20K%20Negations/README.md) | `贪心`,`数组`,`排序` | 简单 | 第 127 场周赛 |
| 1006 | [笨阶乘](/solution/1000-1099/1006.Clumsy%20Factorial/README.md) | `栈`,`数学`,`模拟` | 中等 | 第 127 场周赛 |
@@ -2978,12 +2974,20 @@
| 2961 | [双模幂运算](/solution/2900-2999/2961.Double%20Modular%20Exponentiation/README.md) | `数组`,`数学`,`模拟` | 中等 | 第 375 场周赛 |
| 2962 | [统计最大元素出现至少 K 次的子数组](/solution/2900-2999/2962.Count%20Subarrays%20Where%20Max%20Element%20Appears%20at%20Least%20K%20Times/README.md) | `数组`,`滑动窗口` | 中等 | 第 375 场周赛 |
| 2963 | [统计好分割方案的数目](/solution/2900-2999/2963.Count%20the%20Number%20of%20Good%20Partitions/README.md) | `数组`,`哈希表`,`数学`,`组合数学` | 困难 | 第 375 场周赛 |
-| 2964 | [Number of Divisible Triplet Sums](/solution/2900-2999/2964.Number%20of%20Divisible%20Triplet%20Sums/README.md) | | 中等 | 🔒 |
-| 2965 | [找出缺失和重复的数字](/solution/2900-2999/2965.Find%20Missing%20and%20Repeated%20Values/README.md) | | 简单 | 第 376 场周赛 |
+| 2964 | [Number of Divisible Triplet Sums](/solution/2900-2999/2964.Number%20of%20Divisible%20Triplet%20Sums/README.md) | `数组`,`哈希表` | 中等 | 🔒 |
+| 2965 | [找出缺失和重复的数字](/solution/2900-2999/2965.Find%20Missing%20and%20Repeated%20Values/README.md) | `数组`,`哈希表`,`数学`,`矩阵` | 简单 | 第 376 场周赛 |
| 2966 | [划分数组并满足最大差限制](/solution/2900-2999/2966.Divide%20Array%20Into%20Arrays%20With%20Max%20Difference/README.md) | | 中等 | 第 376 场周赛 |
-| 2967 | [使数组成为等数数组的最小代价](/solution/2900-2999/2967.Minimum%20Cost%20to%20Make%20Array%20Equalindromic/README.md) | | 中等 | 第 376 场周赛 |
-| 2968 | [执行操作使频率分数最大](/solution/2900-2999/2968.Apply%20Operations%20to%20Maximize%20Frequency%20Score/README.md) | | 困难 | 第 376 场周赛 |
-| 2969 | [Minimum Number of Coins for Fruits II](/solution/2900-2999/2969.Minimum%20Number%20of%20Coins%20for%20Fruits%20II/README.md) | | 困难 | 🔒 |
+| 2967 | [使数组成为等数数组的最小代价](/solution/2900-2999/2967.Minimum%20Cost%20to%20Make%20Array%20Equalindromic/README.md) | `贪心`,`数组`,`数学`,`排序` | 中等 | 第 376 场周赛 |
+| 2968 | [执行操作使频率分数最大](/solution/2900-2999/2968.Apply%20Operations%20to%20Maximize%20Frequency%20Score/README.md) | `数组`,`二分查找`,`前缀和`,`排序`,`滑动窗口` | 困难 | 第 376 场周赛 |
+| 2969 | [购买水果需要的最少金币数 II](/solution/2900-2999/2969.Minimum%20Number%20of%20Coins%20for%20Fruits%20II/README.md) | `队列`,`数组`,`动态规划`,`单调队列` | 困难 | 🔒 |
+| 2970 | [统计移除递增子数组的数目 I](/solution/2900-2999/2970.Count%20the%20Number%20of%20Incremovable%20Subarrays%20I/README.md) | | 简单 | 第 120 场双周赛 |
+| 2971 | [找到最大周长的多边形](/solution/2900-2999/2971.Find%20Polygon%20With%20the%20Largest%20Perimeter/README.md) | | 中等 | 第 120 场双周赛 |
+| 2972 | [统计移除递增子数组的数目 II](/solution/2900-2999/2972.Count%20the%20Number%20of%20Incremovable%20Subarrays%20II/README.md) | | 困难 | 第 120 场双周赛 |
+| 2973 | [树中每个节点放置的金币数目](/solution/2900-2999/2973.Find%20Number%20of%20Coins%20to%20Place%20in%20Tree%20Nodes/README.md) | | 困难 | 第 120 场双周赛 |
+| 2974 | [最小数字游戏](/solution/2900-2999/2974.Minimum%20Number%20Game/README.md) | | 简单 | 第 377 场周赛 |
+| 2975 | [移除栅栏得到的正方形田地的最大面积](/solution/2900-2999/2975.Maximum%20Square%20Area%20by%20Removing%20Fences%20From%20a%20Field/README.md) | | 中等 | 第 377 场周赛 |
+| 2976 | [转换字符串的最小成本 I](/solution/2900-2999/2976.Minimum%20Cost%20to%20Convert%20String%20I/README.md) | | 中等 | 第 377 场周赛 |
+| 2977 | [转换字符串的最小成本 II](/solution/2900-2999/2977.Minimum%20Cost%20to%20Convert%20String%20II/README.md) | | 困难 | 第 377 场周赛 |
## 版权
diff --git a/solution/README_EN.md b/solution/README_EN.md
index 230266e390992..aaf2d64be01e8 100644
--- a/solution/README_EN.md
+++ b/solution/README_EN.md
@@ -1012,10 +1012,6 @@ Press Control + F(or Command + F on
| 1001 | [Grid Illumination](/solution/1000-1099/1001.Grid%20Illumination/README_EN.md) | `Array`,`Hash Table` | Hard | Weekly Contest 125 |
| 1002 | [Find Common Characters](/solution/1000-1099/1002.Find%20Common%20Characters/README_EN.md) | `Array`,`Hash Table`,`String` | Easy | Weekly Contest 126 |
| 1003 | [Check If Word Is Valid After Substitutions](/solution/1000-1099/1003.Check%20If%20Word%20Is%20Valid%20After%20Substitutions/README_EN.md) | `Stack`,`String` | Medium | Weekly Contest 126 |
-| 10031 | [Count the Number of Incremovable Subarrays I](/solution/10000-10099/10031.Count%20the%20Number%20of%20Incremovable%20Subarrays%20I/README_EN.md) | | Easy | Biweekly Contest 120 |
-| 10032 | [Find Polygon With the Largest Perimeter](/solution/10000-10099/10032.Find%20Polygon%20With%20the%20Largest%20Perimeter/README_EN.md) | | Medium | Biweekly Contest 120 |
-| 10033 | [Count the Number of Incremovable Subarrays II](/solution/10000-10099/10033.Count%20the%20Number%20of%20Incremovable%20Subarrays%20II/README_EN.md) | | Hard | Biweekly Contest 120 |
-| 10034 | [Find Number of Coins to Place in Tree Nodes](/solution/10000-10099/10034.Find%20Number%20of%20Coins%20to%20Place%20in%20Tree%20Nodes/README_EN.md) | | Hard | Biweekly Contest 120 |
| 1004 | [Max Consecutive Ones III](/solution/1000-1099/1004.Max%20Consecutive%20Ones%20III/README_EN.md) | `Array`,`Binary Search`,`Prefix Sum`,`Sliding Window` | Medium | Weekly Contest 126 |
| 1005 | [Maximize Sum Of Array After K Negations](/solution/1000-1099/1005.Maximize%20Sum%20Of%20Array%20After%20K%20Negations/README_EN.md) | `Greedy`,`Array`,`Sorting` | Easy | Weekly Contest 127 |
| 1006 | [Clumsy Factorial](/solution/1000-1099/1006.Clumsy%20Factorial/README_EN.md) | `Stack`,`Math`,`Simulation` | Medium | Weekly Contest 127 |
@@ -2976,12 +2972,20 @@ Press Control + F(or Command + F on
| 2961 | [Double Modular Exponentiation](/solution/2900-2999/2961.Double%20Modular%20Exponentiation/README_EN.md) | `Array`,`Math`,`Simulation` | Medium | Weekly Contest 375 |
| 2962 | [Count Subarrays Where Max Element Appears at Least K Times](/solution/2900-2999/2962.Count%20Subarrays%20Where%20Max%20Element%20Appears%20at%20Least%20K%20Times/README_EN.md) | `Array`,`Sliding Window` | Medium | Weekly Contest 375 |
| 2963 | [Count the Number of Good Partitions](/solution/2900-2999/2963.Count%20the%20Number%20of%20Good%20Partitions/README_EN.md) | `Array`,`Hash Table`,`Math`,`Combinatorics` | Hard | Weekly Contest 375 |
-| 2964 | [Number of Divisible Triplet Sums](/solution/2900-2999/2964.Number%20of%20Divisible%20Triplet%20Sums/README_EN.md) | | Medium | 🔒 |
-| 2965 | [Find Missing and Repeated Values](/solution/2900-2999/2965.Find%20Missing%20and%20Repeated%20Values/README_EN.md) | | Easy | Weekly Contest 376 |
+| 2964 | [Number of Divisible Triplet Sums](/solution/2900-2999/2964.Number%20of%20Divisible%20Triplet%20Sums/README_EN.md) | `Array`,`Hash Table` | Medium | 🔒 |
+| 2965 | [Find Missing and Repeated Values](/solution/2900-2999/2965.Find%20Missing%20and%20Repeated%20Values/README_EN.md) | `Array`,`Hash Table`,`Math`,`Matrix` | Easy | Weekly Contest 376 |
| 2966 | [Divide Array Into Arrays With Max Difference](/solution/2900-2999/2966.Divide%20Array%20Into%20Arrays%20With%20Max%20Difference/README_EN.md) | | Medium | Weekly Contest 376 |
-| 2967 | [Minimum Cost to Make Array Equalindromic](/solution/2900-2999/2967.Minimum%20Cost%20to%20Make%20Array%20Equalindromic/README_EN.md) | | Medium | Weekly Contest 376 |
-| 2968 | [Apply Operations to Maximize Frequency Score](/solution/2900-2999/2968.Apply%20Operations%20to%20Maximize%20Frequency%20Score/README_EN.md) | | Hard | Weekly Contest 376 |
-| 2969 | [Minimum Number of Coins for Fruits II](/solution/2900-2999/2969.Minimum%20Number%20of%20Coins%20for%20Fruits%20II/README_EN.md) | | Hard | 🔒 |
+| 2967 | [Minimum Cost to Make Array Equalindromic](/solution/2900-2999/2967.Minimum%20Cost%20to%20Make%20Array%20Equalindromic/README_EN.md) | `Greedy`,`Array`,`Math`,`Sorting` | Medium | Weekly Contest 376 |
+| 2968 | [Apply Operations to Maximize Frequency Score](/solution/2900-2999/2968.Apply%20Operations%20to%20Maximize%20Frequency%20Score/README_EN.md) | `Array`,`Binary Search`,`Prefix Sum`,`Sorting`,`Sliding Window` | Hard | Weekly Contest 376 |
+| 2969 | [Minimum Number of Coins for Fruits II](/solution/2900-2999/2969.Minimum%20Number%20of%20Coins%20for%20Fruits%20II/README_EN.md) | `Queue`,`Array`,`Dynamic Programming`,`Monotonic Queue` | Hard | 🔒 |
+| 2970 | [Count the Number of Incremovable Subarrays I](/solution/2900-2999/2970.Count%20the%20Number%20of%20Incremovable%20Subarrays%20I/README_EN.md) | | Easy | Biweekly Contest 120 |
+| 2971 | [Find Polygon With the Largest Perimeter](/solution/2900-2999/2971.Find%20Polygon%20With%20the%20Largest%20Perimeter/README_EN.md) | | Medium | Biweekly Contest 120 |
+| 2972 | [Count the Number of Incremovable Subarrays II](/solution/2900-2999/2972.Count%20the%20Number%20of%20Incremovable%20Subarrays%20II/README_EN.md) | | Hard | Biweekly Contest 120 |
+| 2973 | [Find Number of Coins to Place in Tree Nodes](/solution/2900-2999/2973.Find%20Number%20of%20Coins%20to%20Place%20in%20Tree%20Nodes/README_EN.md) | | Hard | Biweekly Contest 120 |
+| 2974 | [Minimum Number Game](/solution/2900-2999/2974.Minimum%20Number%20Game/README_EN.md) | | Easy | Weekly Contest 377 |
+| 2975 | [Maximum Square Area by Removing Fences From a Field](/solution/2900-2999/2975.Maximum%20Square%20Area%20by%20Removing%20Fences%20From%20a%20Field/README_EN.md) | | Medium | Weekly Contest 377 |
+| 2976 | [Minimum Cost to Convert String I](/solution/2900-2999/2976.Minimum%20Cost%20to%20Convert%20String%20I/README_EN.md) | | Medium | Weekly Contest 377 |
+| 2977 | [Minimum Cost to Convert String II](/solution/2900-2999/2977.Minimum%20Cost%20to%20Convert%20String%20II/README_EN.md) | | Hard | Weekly Contest 377 |
## Copyright
diff --git a/solution/main.py b/solution/main.py
index b4d1c0ee449a5..64bf35f00be21 100644
--- a/solution/main.py
+++ b/solution/main.py
@@ -365,7 +365,7 @@ def run():
for q in spider.get_all_questions(retry=6):
slug = q["stat"]["question__title_slug"]
qid = q["stat"]["frontend_question_id"]
- if slug in question_details:
+ if slug in question_details and qid < 2960:
continue
detail = spider.get_question_detail(
slug, retry=4
diff --git a/solution/summary.md b/solution/summary.md
index 8c30513814f93..7f895c0bb8f8d 100644
--- a/solution/summary.md
+++ b/solution/summary.md
@@ -3032,4 +3032,12 @@
- [2966.划分数组并满足最大差限制](/solution/2900-2999/2966.Divide%20Array%20Into%20Arrays%20With%20Max%20Difference/README.md)
- [2967.使数组成为等数数组的最小代价](/solution/2900-2999/2967.Minimum%20Cost%20to%20Make%20Array%20Equalindromic/README.md)
- [2968.执行操作使频率分数最大](/solution/2900-2999/2968.Apply%20Operations%20to%20Maximize%20Frequency%20Score/README.md)
- - [2969.Minimum Number of Coins for Fruits II](/solution/2900-2999/2969.Minimum%20Number%20of%20Coins%20for%20Fruits%20II/README.md)
+ - [2969.购买水果需要的最少金币数 II](/solution/2900-2999/2969.Minimum%20Number%20of%20Coins%20for%20Fruits%20II/README.md)
+ - [2970.统计移除递增子数组的数目 I](/solution/2900-2999/2970.Count%20the%20Number%20of%20Incremovable%20Subarrays%20I/README.md)
+ - [2971.找到最大周长的多边形](/solution/2900-2999/2971.Find%20Polygon%20With%20the%20Largest%20Perimeter/README.md)
+ - [2972.统计移除递增子数组的数目 II](/solution/2900-2999/2972.Count%20the%20Number%20of%20Incremovable%20Subarrays%20II/README.md)
+ - [2973.树中每个节点放置的金币数目](/solution/2900-2999/2973.Find%20Number%20of%20Coins%20to%20Place%20in%20Tree%20Nodes/README.md)
+ - [2974.最小数字游戏](/solution/2900-2999/2974.Minimum%20Number%20Game/README.md)
+ - [2975.移除栅栏得到的正方形田地的最大面积](/solution/2900-2999/2975.Maximum%20Square%20Area%20by%20Removing%20Fences%20From%20a%20Field/README.md)
+ - [2976.转换字符串的最小成本 I](/solution/2900-2999/2976.Minimum%20Cost%20to%20Convert%20String%20I/README.md)
+ - [2977.转换字符串的最小成本 II](/solution/2900-2999/2977.Minimum%20Cost%20to%20Convert%20String%20II/README.md)
diff --git a/solution/summary_en.md b/solution/summary_en.md
index 646f1de37119e..26e0e1c92cf58 100644
--- a/solution/summary_en.md
+++ b/solution/summary_en.md
@@ -3033,3 +3033,11 @@
- [2967.Minimum Cost to Make Array Equalindromic](/solution/2900-2999/2967.Minimum%20Cost%20to%20Make%20Array%20Equalindromic/README_EN.md)
- [2968.Apply Operations to Maximize Frequency Score](/solution/2900-2999/2968.Apply%20Operations%20to%20Maximize%20Frequency%20Score/README_EN.md)
- [2969.Minimum Number of Coins for Fruits II](/solution/2900-2999/2969.Minimum%20Number%20of%20Coins%20for%20Fruits%20II/README_EN.md)
+ - [2970.Count the Number of Incremovable Subarrays I](/solution/2900-2999/2970.Count%20the%20Number%20of%20Incremovable%20Subarrays%20I/README_EN.md)
+ - [2971.Find Polygon With the Largest Perimeter](/solution/2900-2999/2971.Find%20Polygon%20With%20the%20Largest%20Perimeter/README_EN.md)
+ - [2972.Count the Number of Incremovable Subarrays II](/solution/2900-2999/2972.Count%20the%20Number%20of%20Incremovable%20Subarrays%20II/README_EN.md)
+ - [2973.Find Number of Coins to Place in Tree Nodes](/solution/2900-2999/2973.Find%20Number%20of%20Coins%20to%20Place%20in%20Tree%20Nodes/README_EN.md)
+ - [2974.Minimum Number Game](/solution/2900-2999/2974.Minimum%20Number%20Game/README_EN.md)
+ - [2975.Maximum Square Area by Removing Fences From a Field](/solution/2900-2999/2975.Maximum%20Square%20Area%20by%20Removing%20Fences%20From%20a%20Field/README_EN.md)
+ - [2976.Minimum Cost to Convert String I](/solution/2900-2999/2976.Minimum%20Cost%20to%20Convert%20String%20I/README_EN.md)
+ - [2977.Minimum Cost to Convert String II](/solution/2900-2999/2977.Minimum%20Cost%20to%20Convert%20String%20II/README_EN.md)