From afc8673e03dd6a185f777059e55e3439a2c27667 Mon Sep 17 00:00:00 2001 From: Libin YANG Date: Wed, 26 Jun 2024 08:12:39 +0800 Subject: [PATCH 1/3] feat: add solutions to lc problem: No.3198 (#3164) No.3198.Find Cities in Each State --- .prettierignore | 3 +- .../3198.Find Cities in Each State/README.md | 128 ++++++++++++++++++ .../README_EN.md | 127 +++++++++++++++++ .../Solution.py | 11 ++ .../Solution.sql | 7 + solution/DATABASE_README.md | 1 + solution/DATABASE_README_EN.md | 1 + solution/README.md | 1 + solution/README_EN.md | 1 + 9 files changed, 279 insertions(+), 1 deletion(-) create mode 100644 solution/3100-3199/3198.Find Cities in Each State/README.md create mode 100644 solution/3100-3199/3198.Find Cities in Each State/README_EN.md create mode 100644 solution/3100-3199/3198.Find Cities in Each State/Solution.py create mode 100644 solution/3100-3199/3198.Find Cities in Each State/Solution.sql diff --git a/.prettierignore b/.prettierignore index f76480ca0d15f..98948b2cd2533 100644 --- a/.prettierignore +++ b/.prettierignore @@ -24,4 +24,5 @@ node_modules/ /solution/2200-2299/2230.The Users That Are Eligible for Discount/Solution.sql /solution/2200-2299/2252.Dynamic Pivoting of a Table/Solution.sql /solution/2200-2299/2253.Dynamic Unpivoting of a Table/Solution.sql -/solution/3100-3199/3150.Invalid Tweets II/Solution.sql \ No newline at end of file +/solution/3100-3199/3150.Invalid Tweets II/Solution.sql +/solution/3100-3199/3198.Find Cities in Each State/Solution.sql \ No newline at end of file diff --git a/solution/3100-3199/3198.Find Cities in Each State/README.md b/solution/3100-3199/3198.Find Cities in Each State/README.md new file mode 100644 index 0000000000000..d340f3d27c5d0 --- /dev/null +++ b/solution/3100-3199/3198.Find Cities in Each State/README.md @@ -0,0 +1,128 @@ +--- +comments: true +difficulty: 简单 +edit_url: https://github.com/doocs/leetcode/edit/main/solution/3100-3199/3198.Find%20Cities%20in%20Each%20State/README.md +--- + + + +# [3198. 查找每个州的城市 🔒](https://leetcode.cn/problems/find-cities-in-each-state) + +[English Version](/solution/3100-3199/3198.Find%20Cities%20in%20Each%20State/README_EN.md) + +## 题目描述 + + + +

表:cities

+ +
++-------------+---------+
+| Column Name | Type    | 
++-------------+---------+
+| state       | varchar |
+| city        | varchar |
++-------------+---------+
+(state, city) 是这张表的主键(有不同值的列的组合)。
+这张表的每一行包含州名和其中的城市名。
+
+ +

编写一个解决方案来 查找每个州的所有城市,并将它们组合成 一个逗号分隔 的字符串。

+ +

返回结果表以 state 升序 排序。

+ +

结果格式如下所示。

+ +

 

+ +

示例:

+ +
+

输入:

+ +

cities 表:

+ +
++-------------+---------------+
+| state       | city          |
++-------------+---------------+
+| California  | Los Angeles   |
+| California  | San Francisco |
+| California  | San Diego     |
+| Texas       | Houston       |
+| Texas       | Austin        |
+| Texas       | Dallas        |
+| New York    | New York City |
+| New York    | Buffalo       |
+| New York    | Rochester     |
++-------------+---------------+
+
+ +

输出:

+ +
++-------------+---------------------------------------+
+| state       | cities                                |
++-------------+---------------------------------------+
+| California  | Los Angeles, San Diego, San Francisco |
+| New York    | Buffalo, New York City, Rochester     |
+| Texas       | Austin, Dallas, Houston               |
++-------------+---------------------------------------+
+
+ +

解释:

+ + + +

注意:输出表以州名升序排序。

+
+ + + +## 解法 + + + +### 方法一:分组聚合 + +我们可以先按照 `state` 字段进行分组,然后对每个分组内的 `city` 字段进行排序,最后使用 `GROUP_CONCAT` 函数将排序后的城市名连接成一个逗号分隔的字符串。 + + + +#### MySQL + +```sql +# Write your MySQL query statement below +SELECT + state, + GROUP_CONCAT(city ORDER BY city SEPARATOR ', ') cities +FROM cities +GROUP BY 1 +ORDER BY 1; +``` + +#### Pandas + +```python +import pandas as pd + + +def find_cities(cities: pd.DataFrame) -> pd.DataFrame: + result = ( + cities.groupby("state")["city"] + .apply(lambda x: ", ".join(sorted(x))) + .reset_index() + ) + result.columns = ["state", "cities"] + return result +``` + + + + + + diff --git a/solution/3100-3199/3198.Find Cities in Each State/README_EN.md b/solution/3100-3199/3198.Find Cities in Each State/README_EN.md new file mode 100644 index 0000000000000..996bb54bffad1 --- /dev/null +++ b/solution/3100-3199/3198.Find Cities in Each State/README_EN.md @@ -0,0 +1,127 @@ +--- +comments: true +difficulty: Easy +edit_url: https://github.com/doocs/leetcode/edit/main/solution/3100-3199/3198.Find%20Cities%20in%20Each%20State/README_EN.md +--- + + + +# [3198. Find Cities in Each State 🔒](https://leetcode.com/problems/find-cities-in-each-state) + +[中文文档](/solution/3100-3199/3198.Find%20Cities%20in%20Each%20State/README.md) + +## Description + + + +

Table: cities

+ +
++-------------+---------+
+| Column Name | Type    | 
++-------------+---------+
+| state       | varchar |
+| city        | varchar |
++-------------+---------+
+(state, city) is the primary key (combination of columns with unique values) for this table.
+Each row of this table contains the state name and the city name within that state.
+
+ +

Write a solution to find all the cities in each state and combine them into a single comma-separated string.

+ +

Return the result table ordered by state in ascending order.

+ +

The result format is in the following example.

+ +

 

+

Example:

+ +
+

Input:

+ +

cities table:

+ +
++-------------+---------------+
+| state       | city          |
++-------------+---------------+
+| California  | Los Angeles   |
+| California  | San Francisco |
+| California  | San Diego     |
+| Texas       | Houston       |
+| Texas       | Austin        |
+| Texas       | Dallas        |
+| New York    | New York City |
+| New York    | Buffalo       |
+| New York    | Rochester     |
++-------------+---------------+
+
+ +

Output:

+ +
++-------------+---------------------------------------+
+| state       | cities                                |
++-------------+---------------------------------------+
+| California  | Los Angeles, San Diego, San Francisco |
+| New York    | Buffalo, New York City, Rochester     |
+| Texas       | Austin, Dallas, Houston               |
++-------------+---------------------------------------+
+
+ +

Explanation:

+ + + +

Note: The output table is ordered by the state name in ascending order.

+
+ + + +## Solutions + + + +### Solution 1: Grouping and Aggregation + +We can first group by the `state` field, then sort the `city` field within each group, and finally use the `GROUP_CONCAT` function to concatenate the sorted city names into a comma-separated string. + + + +#### MySQL + +```sql +# Write your MySQL query statement below +SELECT + state, + GROUP_CONCAT(city ORDER BY city SEPARATOR ', ') cities +FROM cities +GROUP BY 1 +ORDER BY 1; +``` + +#### Pandas + +```python +import pandas as pd + + +def find_cities(cities: pd.DataFrame) -> pd.DataFrame: + result = ( + cities.groupby("state")["city"] + .apply(lambda x: ", ".join(sorted(x))) + .reset_index() + ) + result.columns = ["state", "cities"] + return result +``` + + + + + + diff --git a/solution/3100-3199/3198.Find Cities in Each State/Solution.py b/solution/3100-3199/3198.Find Cities in Each State/Solution.py new file mode 100644 index 0000000000000..6feb669ac2c73 --- /dev/null +++ b/solution/3100-3199/3198.Find Cities in Each State/Solution.py @@ -0,0 +1,11 @@ +import pandas as pd + + +def find_cities(cities: pd.DataFrame) -> pd.DataFrame: + result = ( + cities.groupby("state")["city"] + .apply(lambda x: ", ".join(sorted(x))) + .reset_index() + ) + result.columns = ["state", "cities"] + return result diff --git a/solution/3100-3199/3198.Find Cities in Each State/Solution.sql b/solution/3100-3199/3198.Find Cities in Each State/Solution.sql new file mode 100644 index 0000000000000..1e8dbc7d8633e --- /dev/null +++ b/solution/3100-3199/3198.Find Cities in Each State/Solution.sql @@ -0,0 +1,7 @@ +# Write your MySQL query statement below +SELECT + state, + GROUP_CONCAT(city ORDER BY city SEPARATOR ', ') cities +FROM cities +GROUP BY 1 +ORDER BY 1; \ No newline at end of file diff --git a/solution/DATABASE_README.md b/solution/DATABASE_README.md index 969dd0a0f92ec..bf49209c2a1ba 100644 --- a/solution/DATABASE_README.md +++ b/solution/DATABASE_README.md @@ -284,6 +284,7 @@ | 3172 | [第二天验证](/solution/3100-3199/3172.Second%20Day%20Verification/README.md) | `数据库` | 简单 | 🔒 | | 3182 | [查找得分最高的学生](/solution/3100-3199/3182.Find%20Top%20Scoring%20Students/README.md) | `数据库` | 中等 | 🔒 | | 3188 | [查找得分最高的学生 II](/solution/3100-3199/3188.Find%20Top%20Scoring%20Students%20II/README.md) | | 困难 | 🔒 | +| 3198 | [查找每个州的城市](/solution/3100-3199/3198.Find%20Cities%20in%20Each%20State/README.md) | | 简单 | 🔒 | ## 版权 diff --git a/solution/DATABASE_README_EN.md b/solution/DATABASE_README_EN.md index b9febbe7756e1..d63d9210ef6c3 100644 --- a/solution/DATABASE_README_EN.md +++ b/solution/DATABASE_README_EN.md @@ -282,6 +282,7 @@ Press Control + F(or Command + F on | 3172 | [Second Day Verification](/solution/3100-3199/3172.Second%20Day%20Verification/README_EN.md) | `Database` | Easy | 🔒 | | 3182 | [Find Top Scoring Students](/solution/3100-3199/3182.Find%20Top%20Scoring%20Students/README_EN.md) | `Database` | Medium | 🔒 | | 3188 | [Find Top Scoring Students II](/solution/3100-3199/3188.Find%20Top%20Scoring%20Students%20II/README_EN.md) | | Hard | 🔒 | +| 3198 | [Find Cities in Each State](/solution/3100-3199/3198.Find%20Cities%20in%20Each%20State/README_EN.md) | | Easy | 🔒 | ## Copyright diff --git a/solution/README.md b/solution/README.md index a9b1395672282..65a435b4ef2ed 100644 --- a/solution/README.md +++ b/solution/README.md @@ -3208,6 +3208,7 @@ | 3195 | [包含所有 1 的最小矩形面积 I](/solution/3100-3199/3195.Find%20the%20Minimum%20Area%20to%20Cover%20All%20Ones%20I/README.md) | | 中等 | 第 403 场周赛 | | 3196 | [最大化子数组的总成本](/solution/3100-3199/3196.Maximize%20Total%20Cost%20of%20Alternating%20Subarrays/README.md) | | 中等 | 第 403 场周赛 | | 3197 | [包含所有 1 的最小矩形面积 II](/solution/3100-3199/3197.Find%20the%20Minimum%20Area%20to%20Cover%20All%20Ones%20II/README.md) | | 困难 | 第 403 场周赛 | +| 3198 | [查找每个州的城市](/solution/3100-3199/3198.Find%20Cities%20in%20Each%20State/README.md) | | 简单 | 🔒 | ## 版权 diff --git a/solution/README_EN.md b/solution/README_EN.md index 00ccaf1eccdc6..8f51d1c735740 100644 --- a/solution/README_EN.md +++ b/solution/README_EN.md @@ -3206,6 +3206,7 @@ Press Control + F(or Command + F on | 3195 | [Find the Minimum Area to Cover All Ones I](/solution/3100-3199/3195.Find%20the%20Minimum%20Area%20to%20Cover%20All%20Ones%20I/README_EN.md) | | Medium | Weekly Contest 403 | | 3196 | [Maximize Total Cost of Alternating Subarrays](/solution/3100-3199/3196.Maximize%20Total%20Cost%20of%20Alternating%20Subarrays/README_EN.md) | | Medium | Weekly Contest 403 | | 3197 | [Find the Minimum Area to Cover All Ones II](/solution/3100-3199/3197.Find%20the%20Minimum%20Area%20to%20Cover%20All%20Ones%20II/README_EN.md) | | Hard | Weekly Contest 403 | +| 3198 | [Find Cities in Each State](/solution/3100-3199/3198.Find%20Cities%20in%20Each%20State/README_EN.md) | | Easy | 🔒 | ## Copyright From 17a7350867eef3525a716a8fb1cf8d343b0154e4 Mon Sep 17 00:00:00 2001 From: Libin YANG Date: Wed, 26 Jun 2024 09:17:20 +0800 Subject: [PATCH 2/3] feat: update lc problems (#3165) --- solution/0100-0199/0127.Word Ladder/README.md | 2 +- .../README.md | 14 ++-- .../README_EN.md | 6 +- .../README.md | 4 +- .../README_EN.md | 2 +- .../2741.Special Permutations/README.md | 69 ++++++++++++++++++- .../2741.Special Permutations/README_EN.md | 67 ++++++++++++++++++ .../2741.Special Permutations/Solution.rs | 32 +++++++++ .../2741.Special Permutations/Solution.ts | 25 +++++++ .../README_EN.md | 60 +++++++++++----- .../README.md | 2 + .../README_EN.md | 2 + .../README.md | 41 ++++++----- .../README_EN.md | 5 ++ .../README.md | 3 + .../README_EN.md | 3 + .../README.md | 6 ++ .../README_EN.md | 6 ++ .../README.md | 4 ++ .../README_EN.md | 4 ++ .../README.md | 3 + .../README_EN.md | 7 +- .../README.md | 4 ++ .../README_EN.md | 4 ++ .../README_EN.md | 2 +- solution/DATABASE_README.md | 2 +- solution/DATABASE_README_EN.md | 2 +- solution/README.md | 14 ++-- solution/README_EN.md | 14 ++-- 29 files changed, 340 insertions(+), 69 deletions(-) create mode 100644 solution/2700-2799/2741.Special Permutations/Solution.rs create mode 100644 solution/2700-2799/2741.Special Permutations/Solution.ts diff --git a/solution/0100-0199/0127.Word Ladder/README.md b/solution/0100-0199/0127.Word Ladder/README.md index ef4ace621e8a5..28d751002c5f0 100644 --- a/solution/0100-0199/0127.Word Ladder/README.md +++ b/solution/0100-0199/0127.Word Ladder/README.md @@ -18,7 +18,7 @@ tags: -

字典 wordList 中从单词 beginWord endWord转换序列 是一个按下述规格形成的序列 beginWord -> s1 -> s2 -> ... -> sk

+

字典 wordList 中从单词 beginWord 到 endWord转换序列 是一个按下述规格形成的序列 beginWord -> s1 -> s2 -> ... -> sk

-
-
 
-
-

 

Constraints:

diff --git a/solution/3100-3199/3194.Minimum Average of Smallest and Largest Elements/README.md b/solution/3100-3199/3194.Minimum Average of Smallest and Largest Elements/README.md index 11ed3314cbcd3..b013c5378d84d 100644 --- a/solution/3100-3199/3194.Minimum Average of Smallest and Largest Elements/README.md +++ b/solution/3100-3199/3194.Minimum Average of Smallest and Largest Elements/README.md @@ -2,6 +2,10 @@ comments: true difficulty: 简单 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3100-3199/3194.Minimum%20Average%20of%20Smallest%20and%20Largest%20Elements/README.md +tags: + - 数组 + - 双指针 + - 排序 --- diff --git a/solution/3100-3199/3194.Minimum Average of Smallest and Largest Elements/README_EN.md b/solution/3100-3199/3194.Minimum Average of Smallest and Largest Elements/README_EN.md index 3bd07c1e4c890..80e412dd5c12f 100644 --- a/solution/3100-3199/3194.Minimum Average of Smallest and Largest Elements/README_EN.md +++ b/solution/3100-3199/3194.Minimum Average of Smallest and Largest Elements/README_EN.md @@ -2,6 +2,10 @@ comments: true difficulty: Easy edit_url: https://github.com/doocs/leetcode/edit/main/solution/3100-3199/3194.Minimum%20Average%20of%20Smallest%20and%20Largest%20Elements/README_EN.md +tags: + - Array + - Two Pointers + - Sorting --- diff --git a/solution/3100-3199/3195.Find the Minimum Area to Cover All Ones I/README_EN.md b/solution/3100-3199/3195.Find the Minimum Area to Cover All Ones I/README_EN.md index 791bf0115bf14..ee14207784ff8 100644 --- a/solution/3100-3199/3195.Find the Minimum Area to Cover All Ones I/README_EN.md +++ b/solution/3100-3199/3195.Find the Minimum Area to Cover All Ones I/README_EN.md @@ -36,7 +36,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/solution/3100-3199/3195.Fi

Example 2:

-

Input: grid = [[0,0],[1,0]]

+

Input: grid = [[1,0],[0,0]]

Output: 1

diff --git a/solution/DATABASE_README.md b/solution/DATABASE_README.md index bf49209c2a1ba..77ef150eb991a 100644 --- a/solution/DATABASE_README.md +++ b/solution/DATABASE_README.md @@ -283,7 +283,7 @@ | 3166 | [计算停车费与时长](/solution/3100-3199/3166.Calculate%20Parking%20Fees%20and%20Duration/README.md) | `数据库` | 中等 | 🔒 | | 3172 | [第二天验证](/solution/3100-3199/3172.Second%20Day%20Verification/README.md) | `数据库` | 简单 | 🔒 | | 3182 | [查找得分最高的学生](/solution/3100-3199/3182.Find%20Top%20Scoring%20Students/README.md) | `数据库` | 中等 | 🔒 | -| 3188 | [查找得分最高的学生 II](/solution/3100-3199/3188.Find%20Top%20Scoring%20Students%20II/README.md) | | 困难 | 🔒 | +| 3188 | [查找得分最高的学生 II](/solution/3100-3199/3188.Find%20Top%20Scoring%20Students%20II/README.md) | `数据库` | 困难 | 🔒 | | 3198 | [查找每个州的城市](/solution/3100-3199/3198.Find%20Cities%20in%20Each%20State/README.md) | | 简单 | 🔒 | ## 版权 diff --git a/solution/DATABASE_README_EN.md b/solution/DATABASE_README_EN.md index d63d9210ef6c3..064fcaa4f9f92 100644 --- a/solution/DATABASE_README_EN.md +++ b/solution/DATABASE_README_EN.md @@ -281,7 +281,7 @@ Press Control + F(or Command + F on | 3166 | [Calculate Parking Fees and Duration](/solution/3100-3199/3166.Calculate%20Parking%20Fees%20and%20Duration/README_EN.md) | `Database` | Medium | 🔒 | | 3172 | [Second Day Verification](/solution/3100-3199/3172.Second%20Day%20Verification/README_EN.md) | `Database` | Easy | 🔒 | | 3182 | [Find Top Scoring Students](/solution/3100-3199/3182.Find%20Top%20Scoring%20Students/README_EN.md) | `Database` | Medium | 🔒 | -| 3188 | [Find Top Scoring Students II](/solution/3100-3199/3188.Find%20Top%20Scoring%20Students%20II/README_EN.md) | | Hard | 🔒 | +| 3188 | [Find Top Scoring Students II](/solution/3100-3199/3188.Find%20Top%20Scoring%20Students%20II/README_EN.md) | `Database` | Hard | 🔒 | | 3198 | [Find Cities in Each State](/solution/3100-3199/3198.Find%20Cities%20in%20Each%20State/README_EN.md) | | Easy | 🔒 | ## Copyright diff --git a/solution/README.md b/solution/README.md index 65a435b4ef2ed..def134542b051 100644 --- a/solution/README.md +++ b/solution/README.md @@ -3198,13 +3198,13 @@ | 3185 | [构成整天的下标对数目 II](/solution/3100-3199/3185.Count%20Pairs%20That%20Form%20a%20Complete%20Day%20II/README.md) | `数组`,`哈希表`,`计数` | 中等 | 第 402 场周赛 | | 3186 | [施咒的最大总伤害](/solution/3100-3199/3186.Maximum%20Total%20Damage%20With%20Spell%20Casting/README.md) | `数组`,`哈希表`,`双指针`,`二分查找`,`动态规划`,`计数`,`排序` | 中等 | 第 402 场周赛 | | 3187 | [数组中的峰值](/solution/3100-3199/3187.Peaks%20in%20Array/README.md) | `树状数组`,`线段树`,`数组` | 困难 | 第 402 场周赛 | -| 3188 | [查找得分最高的学生 II](/solution/3100-3199/3188.Find%20Top%20Scoring%20Students%20II/README.md) | | 困难 | 🔒 | -| 3189 | [Minimum Moves to Get a Peaceful Board](/solution/3100-3199/3189.Minimum%20Moves%20to%20Get%20a%20Peaceful%20Board/README.md) | | 中等 | 🔒 | -| 3190 | [使所有元素都可以被 3 整除的最少操作数](/solution/3100-3199/3190.Find%20Minimum%20Operations%20to%20Make%20All%20Elements%20Divisible%20by%20Three/README.md) | | 简单 | 第 133 场双周赛 | -| 3191 | [使二进制数组全部等于 1 的最少操作次数 I](/solution/3100-3199/3191.Minimum%20Operations%20to%20Make%20Binary%20Array%20Elements%20Equal%20to%20One%20I/README.md) | | 中等 | 第 133 场双周赛 | -| 3192 | [使二进制数组全部等于 1 的最少操作次数 II](/solution/3100-3199/3192.Minimum%20Operations%20to%20Make%20Binary%20Array%20Elements%20Equal%20to%20One%20II/README.md) | | 中等 | 第 133 场双周赛 | -| 3193 | [统计逆序对的数目](/solution/3100-3199/3193.Count%20the%20Number%20of%20Inversions/README.md) | | 困难 | 第 133 场双周赛 | -| 3194 | [最小元素和最大元素的最小平均值](/solution/3100-3199/3194.Minimum%20Average%20of%20Smallest%20and%20Largest%20Elements/README.md) | | 简单 | 第 403 场周赛 | +| 3188 | [查找得分最高的学生 II](/solution/3100-3199/3188.Find%20Top%20Scoring%20Students%20II/README.md) | `数据库` | 困难 | 🔒 | +| 3189 | [得到一个和平棋盘的最少步骤](/solution/3100-3199/3189.Minimum%20Moves%20to%20Get%20a%20Peaceful%20Board/README.md) | `贪心`,`数组`,`计数排序`,`排序` | 中等 | 🔒 | +| 3190 | [使所有元素都可以被 3 整除的最少操作数](/solution/3100-3199/3190.Find%20Minimum%20Operations%20to%20Make%20All%20Elements%20Divisible%20by%20Three/README.md) | `数组`,`数学` | 简单 | 第 133 场双周赛 | +| 3191 | [使二进制数组全部等于 1 的最少操作次数 I](/solution/3100-3199/3191.Minimum%20Operations%20to%20Make%20Binary%20Array%20Elements%20Equal%20to%20One%20I/README.md) | `位运算`,`队列`,`数组`,`前缀和`,`滑动窗口` | 中等 | 第 133 场双周赛 | +| 3192 | [使二进制数组全部等于 1 的最少操作次数 II](/solution/3100-3199/3192.Minimum%20Operations%20to%20Make%20Binary%20Array%20Elements%20Equal%20to%20One%20II/README.md) | `贪心`,`数组`,`动态规划` | 中等 | 第 133 场双周赛 | +| 3193 | [统计逆序对的数目](/solution/3100-3199/3193.Count%20the%20Number%20of%20Inversions/README.md) | `数组`,`动态规划` | 困难 | 第 133 场双周赛 | +| 3194 | [最小元素和最大元素的最小平均值](/solution/3100-3199/3194.Minimum%20Average%20of%20Smallest%20and%20Largest%20Elements/README.md) | `数组`,`双指针`,`排序` | 简单 | 第 403 场周赛 | | 3195 | [包含所有 1 的最小矩形面积 I](/solution/3100-3199/3195.Find%20the%20Minimum%20Area%20to%20Cover%20All%20Ones%20I/README.md) | | 中等 | 第 403 场周赛 | | 3196 | [最大化子数组的总成本](/solution/3100-3199/3196.Maximize%20Total%20Cost%20of%20Alternating%20Subarrays/README.md) | | 中等 | 第 403 场周赛 | | 3197 | [包含所有 1 的最小矩形面积 II](/solution/3100-3199/3197.Find%20the%20Minimum%20Area%20to%20Cover%20All%20Ones%20II/README.md) | | 困难 | 第 403 场周赛 | diff --git a/solution/README_EN.md b/solution/README_EN.md index 8f51d1c735740..fa8bd6e2b70ea 100644 --- a/solution/README_EN.md +++ b/solution/README_EN.md @@ -3196,13 +3196,13 @@ Press Control + F(or Command + F on | 3185 | [Count Pairs That Form a Complete Day II](/solution/3100-3199/3185.Count%20Pairs%20That%20Form%20a%20Complete%20Day%20II/README_EN.md) | `Array`,`Hash Table`,`Counting` | Medium | Weekly Contest 402 | | 3186 | [Maximum Total Damage With Spell Casting](/solution/3100-3199/3186.Maximum%20Total%20Damage%20With%20Spell%20Casting/README_EN.md) | `Array`,`Hash Table`,`Two Pointers`,`Binary Search`,`Dynamic Programming`,`Counting`,`Sorting` | Medium | Weekly Contest 402 | | 3187 | [Peaks in Array](/solution/3100-3199/3187.Peaks%20in%20Array/README_EN.md) | `Binary Indexed Tree`,`Segment Tree`,`Array` | Hard | Weekly Contest 402 | -| 3188 | [Find Top Scoring Students II](/solution/3100-3199/3188.Find%20Top%20Scoring%20Students%20II/README_EN.md) | | Hard | 🔒 | -| 3189 | [Minimum Moves to Get a Peaceful Board](/solution/3100-3199/3189.Minimum%20Moves%20to%20Get%20a%20Peaceful%20Board/README_EN.md) | | Medium | 🔒 | -| 3190 | [Find Minimum Operations to Make All Elements Divisible by Three](/solution/3100-3199/3190.Find%20Minimum%20Operations%20to%20Make%20All%20Elements%20Divisible%20by%20Three/README_EN.md) | | Easy | Biweekly Contest 133 | -| 3191 | [Minimum Operations to Make Binary Array Elements Equal to One I](/solution/3100-3199/3191.Minimum%20Operations%20to%20Make%20Binary%20Array%20Elements%20Equal%20to%20One%20I/README_EN.md) | | Medium | Biweekly Contest 133 | -| 3192 | [Minimum Operations to Make Binary Array Elements Equal to One II](/solution/3100-3199/3192.Minimum%20Operations%20to%20Make%20Binary%20Array%20Elements%20Equal%20to%20One%20II/README_EN.md) | | Medium | Biweekly Contest 133 | -| 3193 | [Count the Number of Inversions](/solution/3100-3199/3193.Count%20the%20Number%20of%20Inversions/README_EN.md) | | Hard | Biweekly Contest 133 | -| 3194 | [Minimum Average of Smallest and Largest Elements](/solution/3100-3199/3194.Minimum%20Average%20of%20Smallest%20and%20Largest%20Elements/README_EN.md) | | Easy | Weekly Contest 403 | +| 3188 | [Find Top Scoring Students II](/solution/3100-3199/3188.Find%20Top%20Scoring%20Students%20II/README_EN.md) | `Database` | Hard | 🔒 | +| 3189 | [Minimum Moves to Get a Peaceful Board](/solution/3100-3199/3189.Minimum%20Moves%20to%20Get%20a%20Peaceful%20Board/README_EN.md) | `Greedy`,`Array`,`Counting Sort`,`Sorting` | Medium | 🔒 | +| 3190 | [Find Minimum Operations to Make All Elements Divisible by Three](/solution/3100-3199/3190.Find%20Minimum%20Operations%20to%20Make%20All%20Elements%20Divisible%20by%20Three/README_EN.md) | `Array`,`Math` | Easy | Biweekly Contest 133 | +| 3191 | [Minimum Operations to Make Binary Array Elements Equal to One I](/solution/3100-3199/3191.Minimum%20Operations%20to%20Make%20Binary%20Array%20Elements%20Equal%20to%20One%20I/README_EN.md) | `Bit Manipulation`,`Queue`,`Array`,`Prefix Sum`,`Sliding Window` | Medium | Biweekly Contest 133 | +| 3192 | [Minimum Operations to Make Binary Array Elements Equal to One II](/solution/3100-3199/3192.Minimum%20Operations%20to%20Make%20Binary%20Array%20Elements%20Equal%20to%20One%20II/README_EN.md) | `Greedy`,`Array`,`Dynamic Programming` | Medium | Biweekly Contest 133 | +| 3193 | [Count the Number of Inversions](/solution/3100-3199/3193.Count%20the%20Number%20of%20Inversions/README_EN.md) | `Array`,`Dynamic Programming` | Hard | Biweekly Contest 133 | +| 3194 | [Minimum Average of Smallest and Largest Elements](/solution/3100-3199/3194.Minimum%20Average%20of%20Smallest%20and%20Largest%20Elements/README_EN.md) | `Array`,`Two Pointers`,`Sorting` | Easy | Weekly Contest 403 | | 3195 | [Find the Minimum Area to Cover All Ones I](/solution/3100-3199/3195.Find%20the%20Minimum%20Area%20to%20Cover%20All%20Ones%20I/README_EN.md) | | Medium | Weekly Contest 403 | | 3196 | [Maximize Total Cost of Alternating Subarrays](/solution/3100-3199/3196.Maximize%20Total%20Cost%20of%20Alternating%20Subarrays/README_EN.md) | | Medium | Weekly Contest 403 | | 3197 | [Find the Minimum Area to Cover All Ones II](/solution/3100-3199/3197.Find%20the%20Minimum%20Area%20to%20Cover%20All%20Ones%20II/README_EN.md) | | Hard | Weekly Contest 403 | From 7325c86ddefba83fb614ce0694109c6cbb0a5567 Mon Sep 17 00:00:00 2001 From: Doocs Bot Date: Wed, 26 Jun 2024 20:03:58 +0800 Subject: [PATCH 3/3] chore: auto update starcharts --- images/starcharts.svg | 51856 ++++++++++++++++++++-------------------- 1 file changed, 25981 insertions(+), 25875 deletions(-) diff --git a/images/starcharts.svg b/images/starcharts.svg index 6baa47dab4e3a..339acfc0af351 100644 --- a/images/starcharts.svg +++ b/images/starcharts.svg @@ -1,4 +1,4 @@ - + \n2018-09-252019-06-132020-03-012020-11-182021-08-062022-04-252023-01-122023-09-302024-06-18Time2018-09-252019-06-142020-03-032020-11-212021-08-102022-04-302023-01-182023-10-072024-06-26Time03800 \ No newline at end of file +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14 +L 950 14" style="stroke-width:2;stroke:rgba(129,199,239,1.0);fill:none"/> \ No newline at end of file