diff --git a/solution/3400-3499/3482.Analyze Organization Hierarchy/README.md b/solution/3400-3499/3482.Analyze Organization Hierarchy/README.md index 88409e56b6bbd..502a994e53d75 100644 --- a/solution/3400-3499/3482.Analyze Organization Hierarchy/README.md +++ b/solution/3400-3499/3482.Analyze Organization Hierarchy/README.md @@ -135,7 +135,7 @@ employee_id 是这张表的唯一主键。 diff --git a/solution/3400-3499/3496.Maximize Score After Pair Deletions/README.md b/solution/3400-3499/3496.Maximize Score After Pair Deletions/README.md index 2d28374ba4b3b..05ae8fff402b3 100644 --- a/solution/3400-3499/3496.Maximize Score After Pair Deletions/README.md +++ b/solution/3400-3499/3496.Maximize Score After Pair Deletions/README.md @@ -2,6 +2,9 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3496.Maximize%20Score%20After%20Pair%20Deletions/README.md +tags: + - 贪心 + - 数组 --- diff --git a/solution/3400-3499/3496.Maximize Score After Pair Deletions/README_EN.md b/solution/3400-3499/3496.Maximize Score After Pair Deletions/README_EN.md index 16f79e3644d4e..605330e67ffca 100644 --- a/solution/3400-3499/3496.Maximize Score After Pair Deletions/README_EN.md +++ b/solution/3400-3499/3496.Maximize Score After Pair Deletions/README_EN.md @@ -2,6 +2,9 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3496.Maximize%20Score%20After%20Pair%20Deletions/README_EN.md +tags: + - Greedy + - Array --- diff --git a/solution/3400-3499/3498.Reverse Degree of a String/README.md b/solution/3400-3499/3498.Reverse Degree of a String/README.md index 8b95ad9ef2e3f..2ae4b76e55cc0 100644 --- a/solution/3400-3499/3498.Reverse Degree of a String/README.md +++ b/solution/3400-3499/3498.Reverse Degree of a String/README.md @@ -2,6 +2,9 @@ comments: true difficulty: 简单 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3498.Reverse%20Degree%20of%20a%20String/README.md +tags: + - 字符串 + - 模拟 --- diff --git a/solution/3400-3499/3498.Reverse Degree of a String/README_EN.md b/solution/3400-3499/3498.Reverse Degree of a String/README_EN.md index 0d2ba88add1b5..5cf48883daae3 100644 --- a/solution/3400-3499/3498.Reverse Degree of a String/README_EN.md +++ b/solution/3400-3499/3498.Reverse Degree of a String/README_EN.md @@ -2,6 +2,9 @@ comments: true difficulty: Easy edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3498.Reverse%20Degree%20of%20a%20String/README_EN.md +tags: + - String + - Simulation --- diff --git a/solution/3400-3499/3499.Maximize Active Section with Trade I/README.md b/solution/3400-3499/3499.Maximize Active Section with Trade I/README.md index 38d2e933099f5..386cabdb7b6ed 100644 --- a/solution/3400-3499/3499.Maximize Active Section with Trade I/README.md +++ b/solution/3400-3499/3499.Maximize Active Section with Trade I/README.md @@ -2,6 +2,9 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3499.Maximize%20Active%20Section%20with%20Trade%20I/README.md +tags: + - 字符串 + - 枚举 --- diff --git a/solution/3400-3499/3499.Maximize Active Section with Trade I/README_EN.md b/solution/3400-3499/3499.Maximize Active Section with Trade I/README_EN.md index 316b5c450e549..dd5927dddb75d 100644 --- a/solution/3400-3499/3499.Maximize Active Section with Trade I/README_EN.md +++ b/solution/3400-3499/3499.Maximize Active Section with Trade I/README_EN.md @@ -2,6 +2,9 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3400-3499/3499.Maximize%20Active%20Section%20with%20Trade%20I/README_EN.md +tags: + - String + - Enumeration --- diff --git a/solution/3500-3599/3500.Minimum Cost to Divide Array Into Subarrays/README.md b/solution/3500-3599/3500.Minimum Cost to Divide Array Into Subarrays/README.md index 9bf4c981ea035..846de3bc27c55 100644 --- a/solution/3500-3599/3500.Minimum Cost to Divide Array Into Subarrays/README.md +++ b/solution/3500-3599/3500.Minimum Cost to Divide Array Into Subarrays/README.md @@ -2,6 +2,10 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3500.Minimum%20Cost%20to%20Divide%20Array%20Into%20Subarrays/README.md +tags: + - 数组 + - 动态规划 + - 前缀和 --- diff --git a/solution/3500-3599/3500.Minimum Cost to Divide Array Into Subarrays/README_EN.md b/solution/3500-3599/3500.Minimum Cost to Divide Array Into Subarrays/README_EN.md index ab403c073ad5a..002c51ac750f1 100644 --- a/solution/3500-3599/3500.Minimum Cost to Divide Array Into Subarrays/README_EN.md +++ b/solution/3500-3599/3500.Minimum Cost to Divide Array Into Subarrays/README_EN.md @@ -2,6 +2,10 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3500.Minimum%20Cost%20to%20Divide%20Array%20Into%20Subarrays/README_EN.md +tags: + - Array + - Dynamic Programming + - Prefix Sum --- diff --git a/solution/3500-3599/3501.Maximize Active Section with Trade II/README.md b/solution/3500-3599/3501.Maximize Active Section with Trade II/README.md index 2eb5f21104e28..edb36a81a2472 100644 --- a/solution/3500-3599/3501.Maximize Active Section with Trade II/README.md +++ b/solution/3500-3599/3501.Maximize Active Section with Trade II/README.md @@ -2,6 +2,11 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3501.Maximize%20Active%20Section%20with%20Trade%20II/README.md +tags: + - 线段树 + - 数组 + - 字符串 + - 二分查找 --- diff --git a/solution/3500-3599/3501.Maximize Active Section with Trade II/README_EN.md b/solution/3500-3599/3501.Maximize Active Section with Trade II/README_EN.md index f9820eafe32ea..d04c52b36573a 100644 --- a/solution/3500-3599/3501.Maximize Active Section with Trade II/README_EN.md +++ b/solution/3500-3599/3501.Maximize Active Section with Trade II/README_EN.md @@ -2,6 +2,11 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3501.Maximize%20Active%20Section%20with%20Trade%20II/README_EN.md +tags: + - Segment Tree + - Array + - String + - Binary Search --- diff --git a/solution/3500-3599/3502.Minimum Cost to Reach Every Position/README.md b/solution/3500-3599/3502.Minimum Cost to Reach Every Position/README.md index 606f8926fa060..2a77898ba3016 100644 --- a/solution/3500-3599/3502.Minimum Cost to Reach Every Position/README.md +++ b/solution/3500-3599/3502.Minimum Cost to Reach Every Position/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 简单 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3502.Minimum%20Cost%20to%20Reach%20Every%20Position/README.md +tags: + - 数组 --- diff --git a/solution/3500-3599/3502.Minimum Cost to Reach Every Position/README_EN.md b/solution/3500-3599/3502.Minimum Cost to Reach Every Position/README_EN.md index 225ae995772ba..58d2e7a494feb 100644 --- a/solution/3500-3599/3502.Minimum Cost to Reach Every Position/README_EN.md +++ b/solution/3500-3599/3502.Minimum Cost to Reach Every Position/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Easy edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3502.Minimum%20Cost%20to%20Reach%20Every%20Position/README_EN.md +tags: + - Array --- diff --git a/solution/3500-3599/3503.Longest Palindrome After Substring Concatenation I/README.md b/solution/3500-3599/3503.Longest Palindrome After Substring Concatenation I/README.md index e97cc409608be..53cc43def7534 100644 --- a/solution/3500-3599/3503.Longest Palindrome After Substring Concatenation I/README.md +++ b/solution/3500-3599/3503.Longest Palindrome After Substring Concatenation I/README.md @@ -2,6 +2,11 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3503.Longest%20Palindrome%20After%20Substring%20Concatenation%20I/README.md +tags: + - 双指针 + - 字符串 + - 动态规划 + - 枚举 --- diff --git a/solution/3500-3599/3503.Longest Palindrome After Substring Concatenation I/README_EN.md b/solution/3500-3599/3503.Longest Palindrome After Substring Concatenation I/README_EN.md index 24faceb1e6e89..e1e40281aaa1a 100644 --- a/solution/3500-3599/3503.Longest Palindrome After Substring Concatenation I/README_EN.md +++ b/solution/3500-3599/3503.Longest Palindrome After Substring Concatenation I/README_EN.md @@ -2,6 +2,11 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3503.Longest%20Palindrome%20After%20Substring%20Concatenation%20I/README_EN.md +tags: + - Two Pointers + - String + - Dynamic Programming + - Enumeration --- diff --git a/solution/3500-3599/3504.Longest Palindrome After Substring Concatenation II/README.md b/solution/3500-3599/3504.Longest Palindrome After Substring Concatenation II/README.md index 269de847bbde6..7ee14a477e4d4 100644 --- a/solution/3500-3599/3504.Longest Palindrome After Substring Concatenation II/README.md +++ b/solution/3500-3599/3504.Longest Palindrome After Substring Concatenation II/README.md @@ -2,6 +2,10 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3504.Longest%20Palindrome%20After%20Substring%20Concatenation%20II/README.md +tags: + - 双指针 + - 字符串 + - 动态规划 --- diff --git a/solution/3500-3599/3504.Longest Palindrome After Substring Concatenation II/README_EN.md b/solution/3500-3599/3504.Longest Palindrome After Substring Concatenation II/README_EN.md index 95221be84beba..598cda355159e 100644 --- a/solution/3500-3599/3504.Longest Palindrome After Substring Concatenation II/README_EN.md +++ b/solution/3500-3599/3504.Longest Palindrome After Substring Concatenation II/README_EN.md @@ -2,6 +2,10 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3504.Longest%20Palindrome%20After%20Substring%20Concatenation%20II/README_EN.md +tags: + - Two Pointers + - String + - Dynamic Programming --- diff --git a/solution/3500-3599/3505.Minimum Operations to Make Elements Within K Subarrays Equal/README.md b/solution/3500-3599/3505.Minimum Operations to Make Elements Within K Subarrays Equal/README.md index 6e752aae79241..305837bdbe0bf 100644 --- a/solution/3500-3599/3505.Minimum Operations to Make Elements Within K Subarrays Equal/README.md +++ b/solution/3500-3599/3505.Minimum Operations to Make Elements Within K Subarrays Equal/README.md @@ -2,6 +2,13 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3505.Minimum%20Operations%20to%20Make%20Elements%20Within%20K%20Subarrays%20Equal/README.md +tags: + - 数组 + - 哈希表 + - 数学 + - 动态规划 + - 滑动窗口 + - 堆(优先队列) --- diff --git a/solution/3500-3599/3505.Minimum Operations to Make Elements Within K Subarrays Equal/README_EN.md b/solution/3500-3599/3505.Minimum Operations to Make Elements Within K Subarrays Equal/README_EN.md index c6bf631bd3eec..182675e675e99 100644 --- a/solution/3500-3599/3505.Minimum Operations to Make Elements Within K Subarrays Equal/README_EN.md +++ b/solution/3500-3599/3505.Minimum Operations to Make Elements Within K Subarrays Equal/README_EN.md @@ -2,6 +2,13 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3505.Minimum%20Operations%20to%20Make%20Elements%20Within%20K%20Subarrays%20Equal/README_EN.md +tags: + - Array + - Hash Table + - Math + - Dynamic Programming + - Sliding Window + - Heap (Priority Queue) --- diff --git a/solution/3500-3599/3506.Find Time Required to Eliminate Bacterial Strains II/README.md b/solution/3500-3599/3506.Find Time Required to Eliminate Bacterial Strains/README.md similarity index 61% rename from solution/3500-3599/3506.Find Time Required to Eliminate Bacterial Strains II/README.md rename to solution/3500-3599/3506.Find Time Required to Eliminate Bacterial Strains/README.md index 56b96037f198f..2e81320abb412 100644 --- a/solution/3500-3599/3506.Find Time Required to Eliminate Bacterial Strains II/README.md +++ b/solution/3500-3599/3506.Find Time Required to Eliminate Bacterial Strains/README.md @@ -1,76 +1,78 @@ --- comments: true difficulty: 困难 -edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3506.Find%20Time%20Required%20to%20Eliminate%20Bacterial%20Strains%20II/README.md +edit_url: https://github.com/doocs/leetcode/edit/main/solution/3500-3599/3506.Find%20Time%20Required%20to%20Eliminate%20Bacterial%20Strains/README.md --- -# [3506. Find Time Required to Eliminate Bacterial Strains II 🔒](https://leetcode.cn/problems/find-time-required-to-eliminate-bacterial-strains-ii) +# [3506. 查找消除细菌菌株所需时间 II 🔒](https://leetcode.cn/problems/find-time-required-to-eliminate-bacterial-strains) -[English Version](/solution/3500-3599/3506.Find%20Time%20Required%20to%20Eliminate%20Bacterial%20Strains%20II/README_EN.md) +[English Version](/solution/3500-3599/3506.Find%20Time%20Required%20to%20Eliminate%20Bacterial%20Strains/README_EN.md) ## 题目描述 -

You are given an integer array timeReq and an integer splitTime.

+

给定一个整数数组 timeReq 和一个整数 splitTime

-

In the microscopic world of the human body, the immune system faces an extraordinary challenge: combatting a rapidly multiplying bacterial colony that threatens the body's survival.

+

在人体微观世界中,免疫系统面临着一项非凡的挑战:对抗快速繁殖的细菌群落,这对身体的生存构成威胁。

-

Initially, only one white blood cell (WBC) is deployed to eliminate the bacteria. However, the lone WBC quickly realizes it cannot keep up with the bacterial growth rate.

+

最初,只部署一个 白细胞WBC)来消除细菌。然而,单独的白细胞很快意识到它无法跟上细菌的生长速度。

-

The WBC devises a clever strategy to fight the bacteria:

+

WBC制定了一种巧妙的策略来对抗细菌:

-

You must determine the minimum time required to eliminate all the bacterial strains.

+

您必须确定消除所有细菌菌株所需的 最短 时间。

-

Note that the bacterial strains can be eliminated in any order.

+

注意,细菌菌株可以按任何顺序消除。

 

-

Example 1:

+ +

示例 1:

-

Input: timeReq = [10,4,5], splitTime = 2

+

输入:timeReq = [10,4,5], splitTime = 2

-

Output: 12

+

输出:12

-

Explanation:

+

解释:

-

The elimination process goes as follows:

+

消除过程如下:

-

Example 2:

+

示例 2:

-

Input: timeReq = [10,4], splitTime = 5

+

输入:timeReq = [10,4], splitTime = 5

-

Output:15

+

输出:5

-

Explanation:

+

解释:

-

The elimination process goes as follows:

+

消除过程如下:

 

-

Constraints:

+ +

提示: