diff --git a/solution/3200-3299/3264.Final Array State After K Multiplication Operations I/README.md b/solution/3200-3299/3264.Final Array State After K Multiplication Operations I/README.md index 914a955d2916d..ca129c56ceb47 100644 --- a/solution/3200-3299/3264.Final Array State After K Multiplication Operations I/README.md +++ b/solution/3200-3299/3264.Final Array State After K Multiplication Operations I/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 简单 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3264.Final%20Array%20State%20After%20K%20Multiplication%20Operations%20I/README.md +rating: 1177 +source: 第 412 场周赛 Q1 tags: - 数组 - 数学 diff --git a/solution/3200-3299/3264.Final Array State After K Multiplication Operations I/README_EN.md b/solution/3200-3299/3264.Final Array State After K Multiplication Operations I/README_EN.md index 32619fb63aee2..f7449936fc031 100644 --- a/solution/3200-3299/3264.Final Array State After K Multiplication Operations I/README_EN.md +++ b/solution/3200-3299/3264.Final Array State After K Multiplication Operations I/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Easy edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3264.Final%20Array%20State%20After%20K%20Multiplication%20Operations%20I/README_EN.md +rating: 1177 +source: Weekly Contest 412 Q1 tags: - Array - Math diff --git a/solution/3200-3299/3265.Count Almost Equal Pairs I/README.md b/solution/3200-3299/3265.Count Almost Equal Pairs I/README.md index f019c5ca9879a..d8e0289e1316d 100644 --- a/solution/3200-3299/3265.Count Almost Equal Pairs I/README.md +++ b/solution/3200-3299/3265.Count Almost Equal Pairs I/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3265.Count%20Almost%20Equal%20Pairs%20I/README.md +rating: 1661 +source: 第 412 场周赛 Q2 tags: - 数组 - 哈希表 diff --git a/solution/3200-3299/3265.Count Almost Equal Pairs I/README_EN.md b/solution/3200-3299/3265.Count Almost Equal Pairs I/README_EN.md index 9889eb8bca69a..8e2687cbebcd5 100644 --- a/solution/3200-3299/3265.Count Almost Equal Pairs I/README_EN.md +++ b/solution/3200-3299/3265.Count Almost Equal Pairs I/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3265.Count%20Almost%20Equal%20Pairs%20I/README_EN.md +rating: 1661 +source: Weekly Contest 412 Q2 tags: - Array - Hash Table diff --git a/solution/3200-3299/3266.Final Array State After K Multiplication Operations II/README.md b/solution/3200-3299/3266.Final Array State After K Multiplication Operations II/README.md index 880dee8e29e51..a733a013ef8af 100644 --- a/solution/3200-3299/3266.Final Array State After K Multiplication Operations II/README.md +++ b/solution/3200-3299/3266.Final Array State After K Multiplication Operations II/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3266.Final%20Array%20State%20After%20K%20Multiplication%20Operations%20II/README.md +rating: 2508 +source: 第 412 场周赛 Q3 tags: - 数组 - 模拟 diff --git a/solution/3200-3299/3266.Final Array State After K Multiplication Operations II/README_EN.md b/solution/3200-3299/3266.Final Array State After K Multiplication Operations II/README_EN.md index 72c85e8af7494..c07c67da62c33 100644 --- a/solution/3200-3299/3266.Final Array State After K Multiplication Operations II/README_EN.md +++ b/solution/3200-3299/3266.Final Array State After K Multiplication Operations II/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3266.Final%20Array%20State%20After%20K%20Multiplication%20Operations%20II/README_EN.md +rating: 2508 +source: Weekly Contest 412 Q3 tags: - Array - Simulation diff --git a/solution/3200-3299/3267.Count Almost Equal Pairs II/README.md b/solution/3200-3299/3267.Count Almost Equal Pairs II/README.md index d01441c06554d..9bd7a18c496b1 100644 --- a/solution/3200-3299/3267.Count Almost Equal Pairs II/README.md +++ b/solution/3200-3299/3267.Count Almost Equal Pairs II/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3267.Count%20Almost%20Equal%20Pairs%20II/README.md +rating: 2545 +source: 第 412 场周赛 Q4 tags: - 数组 - 哈希表 diff --git a/solution/3200-3299/3267.Count Almost Equal Pairs II/README_EN.md b/solution/3200-3299/3267.Count Almost Equal Pairs II/README_EN.md index 4d02f2f9bda46..5541a40a53651 100644 --- a/solution/3200-3299/3267.Count Almost Equal Pairs II/README_EN.md +++ b/solution/3200-3299/3267.Count Almost Equal Pairs II/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3267.Count%20Almost%20Equal%20Pairs%20II/README_EN.md +rating: 2545 +source: Weekly Contest 412 Q4 tags: - Array - Hash Table diff --git a/solution/3200-3299/3270.Find the Key of the Numbers/README.md b/solution/3200-3299/3270.Find the Key of the Numbers/README.md index 7c8ca3da5655d..5f83c20b2574d 100644 --- a/solution/3200-3299/3270.Find the Key of the Numbers/README.md +++ b/solution/3200-3299/3270.Find the Key of the Numbers/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 简单 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3270.Find%20the%20Key%20of%20the%20Numbers/README.md +rating: 1205 +source: 第 138 场双周赛 Q1 tags: - 数学 --- diff --git a/solution/3200-3299/3270.Find the Key of the Numbers/README_EN.md b/solution/3200-3299/3270.Find the Key of the Numbers/README_EN.md index 351be580f80c6..3ee0967aaeb48 100644 --- a/solution/3200-3299/3270.Find the Key of the Numbers/README_EN.md +++ b/solution/3200-3299/3270.Find the Key of the Numbers/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Easy edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3270.Find%20the%20Key%20of%20the%20Numbers/README_EN.md +rating: 1205 +source: Biweekly Contest 138 Q1 tags: - Math --- diff --git a/solution/3200-3299/3271.Hash Divided String/README.md b/solution/3200-3299/3271.Hash Divided String/README.md index f3ac1105745fc..a56d69b38c787 100644 --- a/solution/3200-3299/3271.Hash Divided String/README.md +++ b/solution/3200-3299/3271.Hash Divided String/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3271.Hash%20Divided%20String/README.md +rating: 1292 +source: 第 138 场双周赛 Q2 tags: - 字符串 - 模拟 diff --git a/solution/3200-3299/3271.Hash Divided String/README_EN.md b/solution/3200-3299/3271.Hash Divided String/README_EN.md index 0cf7a432b25c2..9ca2130408507 100644 --- a/solution/3200-3299/3271.Hash Divided String/README_EN.md +++ b/solution/3200-3299/3271.Hash Divided String/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3271.Hash%20Divided%20String/README_EN.md +rating: 1292 +source: Biweekly Contest 138 Q2 tags: - String - Simulation diff --git a/solution/3200-3299/3272.Find the Count of Good Integers/README.md b/solution/3200-3299/3272.Find the Count of Good Integers/README.md index 58d6e965b0ef2..ae214ddeffd9d 100644 --- a/solution/3200-3299/3272.Find the Count of Good Integers/README.md +++ b/solution/3200-3299/3272.Find the Count of Good Integers/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3272.Find%20the%20Count%20of%20Good%20Integers/README.md +rating: 2382 +source: 第 138 场双周赛 Q3 tags: - 哈希表 - 数学 diff --git a/solution/3200-3299/3272.Find the Count of Good Integers/README_EN.md b/solution/3200-3299/3272.Find the Count of Good Integers/README_EN.md index 70035b20e7786..6517a87c9feb9 100644 --- a/solution/3200-3299/3272.Find the Count of Good Integers/README_EN.md +++ b/solution/3200-3299/3272.Find the Count of Good Integers/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3272.Find%20the%20Count%20of%20Good%20Integers/README_EN.md +rating: 2382 +source: Biweekly Contest 138 Q3 tags: - Hash Table - Math diff --git a/solution/3200-3299/3273.Minimum Amount of Damage Dealt to Bob/README.md b/solution/3200-3299/3273.Minimum Amount of Damage Dealt to Bob/README.md index 056bf0151e2f5..9ba6bf2d67e5d 100644 --- a/solution/3200-3299/3273.Minimum Amount of Damage Dealt to Bob/README.md +++ b/solution/3200-3299/3273.Minimum Amount of Damage Dealt to Bob/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3273.Minimum%20Amount%20of%20Damage%20Dealt%20to%20Bob/README.md +rating: 2012 +source: 第 138 场双周赛 Q4 tags: - 贪心 - 数组 diff --git a/solution/3200-3299/3273.Minimum Amount of Damage Dealt to Bob/README_EN.md b/solution/3200-3299/3273.Minimum Amount of Damage Dealt to Bob/README_EN.md index 777c541447ec7..298160160d9eb 100644 --- a/solution/3200-3299/3273.Minimum Amount of Damage Dealt to Bob/README_EN.md +++ b/solution/3200-3299/3273.Minimum Amount of Damage Dealt to Bob/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3273.Minimum%20Amount%20of%20Damage%20Dealt%20to%20Bob/README_EN.md +rating: 2012 +source: Biweekly Contest 138 Q4 tags: - Greedy - Array diff --git a/solution/3200-3299/3274.Check if Two Chessboard Squares Have the Same Color/README.md b/solution/3200-3299/3274.Check if Two Chessboard Squares Have the Same Color/README.md index 073c5282b5837..d04e5cc7c35a3 100644 --- a/solution/3200-3299/3274.Check if Two Chessboard Squares Have the Same Color/README.md +++ b/solution/3200-3299/3274.Check if Two Chessboard Squares Have the Same Color/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 简单 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3274.Check%20if%20Two%20Chessboard%20Squares%20Have%20the%20Same%20Color/README.md +rating: 1162 +source: 第 413 场周赛 Q1 tags: - 数学 - 字符串 diff --git a/solution/3200-3299/3274.Check if Two Chessboard Squares Have the Same Color/README_EN.md b/solution/3200-3299/3274.Check if Two Chessboard Squares Have the Same Color/README_EN.md index b99a27dfa0857..1fed5f2b54e37 100644 --- a/solution/3200-3299/3274.Check if Two Chessboard Squares Have the Same Color/README_EN.md +++ b/solution/3200-3299/3274.Check if Two Chessboard Squares Have the Same Color/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Easy edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3274.Check%20if%20Two%20Chessboard%20Squares%20Have%20the%20Same%20Color/README_EN.md +rating: 1162 +source: Weekly Contest 413 Q1 tags: - Math - String diff --git a/solution/3200-3299/3275.K-th Nearest Obstacle Queries/README.md b/solution/3200-3299/3275.K-th Nearest Obstacle Queries/README.md index fbd980ace751a..140b2e7058b62 100644 --- a/solution/3200-3299/3275.K-th Nearest Obstacle Queries/README.md +++ b/solution/3200-3299/3275.K-th Nearest Obstacle Queries/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3275.K-th%20Nearest%20Obstacle%20Queries/README.md +rating: 1419 +source: 第 413 场周赛 Q2 tags: - 数组 - 堆(优先队列) diff --git a/solution/3200-3299/3275.K-th Nearest Obstacle Queries/README_EN.md b/solution/3200-3299/3275.K-th Nearest Obstacle Queries/README_EN.md index 1cb9334599155..c36b25cae9d62 100644 --- a/solution/3200-3299/3275.K-th Nearest Obstacle Queries/README_EN.md +++ b/solution/3200-3299/3275.K-th Nearest Obstacle Queries/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3275.K-th%20Nearest%20Obstacle%20Queries/README_EN.md +rating: 1419 +source: Weekly Contest 413 Q2 tags: - Array - Heap (Priority Queue) diff --git a/solution/3200-3299/3276.Select Cells in Grid With Maximum Score/README.md b/solution/3200-3299/3276.Select Cells in Grid With Maximum Score/README.md index e865f5d71a7e0..c9b31e87ee7d5 100644 --- a/solution/3200-3299/3276.Select Cells in Grid With Maximum Score/README.md +++ b/solution/3200-3299/3276.Select Cells in Grid With Maximum Score/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3276.Select%20Cells%20in%20Grid%20With%20Maximum%20Score/README.md +rating: 2402 +source: 第 413 场周赛 Q3 tags: - 位运算 - 数组 diff --git a/solution/3200-3299/3276.Select Cells in Grid With Maximum Score/README_EN.md b/solution/3200-3299/3276.Select Cells in Grid With Maximum Score/README_EN.md index eb73ec9716089..e3fbc30e93ce7 100644 --- a/solution/3200-3299/3276.Select Cells in Grid With Maximum Score/README_EN.md +++ b/solution/3200-3299/3276.Select Cells in Grid With Maximum Score/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3276.Select%20Cells%20in%20Grid%20With%20Maximum%20Score/README_EN.md +rating: 2402 +source: Weekly Contest 413 Q3 tags: - Bit Manipulation - Array diff --git a/solution/3200-3299/3277.Maximum XOR Score Subarray Queries/README.md b/solution/3200-3299/3277.Maximum XOR Score Subarray Queries/README.md index 5339a28261699..48bdc302bfda4 100644 --- a/solution/3200-3299/3277.Maximum XOR Score Subarray Queries/README.md +++ b/solution/3200-3299/3277.Maximum XOR Score Subarray Queries/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3277.Maximum%20XOR%20Score%20Subarray%20Queries/README.md +rating: 2692 +source: 第 413 场周赛 Q4 tags: - 数组 - 动态规划 diff --git a/solution/3200-3299/3277.Maximum XOR Score Subarray Queries/README_EN.md b/solution/3200-3299/3277.Maximum XOR Score Subarray Queries/README_EN.md index e7d3954a6c8ef..c6be7f6a51500 100644 --- a/solution/3200-3299/3277.Maximum XOR Score Subarray Queries/README_EN.md +++ b/solution/3200-3299/3277.Maximum XOR Score Subarray Queries/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3277.Maximum%20XOR%20Score%20Subarray%20Queries/README_EN.md +rating: 2692 +source: Weekly Contest 413 Q4 tags: - Array - Dynamic Programming diff --git a/solution/3200-3299/3280.Convert Date to Binary/README.md b/solution/3200-3299/3280.Convert Date to Binary/README.md index 8d79033508131..af5a7f82ef7f9 100644 --- a/solution/3200-3299/3280.Convert Date to Binary/README.md +++ b/solution/3200-3299/3280.Convert Date to Binary/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 简单 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3280.Convert%20Date%20to%20Binary/README.md +rating: 1205 +source: 第 414 场周赛 Q1 tags: - 数学 - 字符串 diff --git a/solution/3200-3299/3280.Convert Date to Binary/README_EN.md b/solution/3200-3299/3280.Convert Date to Binary/README_EN.md index 023800a6887e1..25e3d124d5b11 100644 --- a/solution/3200-3299/3280.Convert Date to Binary/README_EN.md +++ b/solution/3200-3299/3280.Convert Date to Binary/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Easy edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3280.Convert%20Date%20to%20Binary/README_EN.md +rating: 1205 +source: Weekly Contest 414 Q1 tags: - Math - String diff --git a/solution/3200-3299/3281.Maximize Score of Numbers in Ranges/README.md b/solution/3200-3299/3281.Maximize Score of Numbers in Ranges/README.md index 54d0771938b09..694e22a058d78 100644 --- a/solution/3200-3299/3281.Maximize Score of Numbers in Ranges/README.md +++ b/solution/3200-3299/3281.Maximize Score of Numbers in Ranges/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3281.Maximize%20Score%20of%20Numbers%20in%20Ranges/README.md +rating: 1768 +source: 第 414 场周赛 Q2 tags: - 贪心 - 数组 diff --git a/solution/3200-3299/3281.Maximize Score of Numbers in Ranges/README_EN.md b/solution/3200-3299/3281.Maximize Score of Numbers in Ranges/README_EN.md index dbc17529c4c75..4304b08895add 100644 --- a/solution/3200-3299/3281.Maximize Score of Numbers in Ranges/README_EN.md +++ b/solution/3200-3299/3281.Maximize Score of Numbers in Ranges/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3281.Maximize%20Score%20of%20Numbers%20in%20Ranges/README_EN.md +rating: 1768 +source: Weekly Contest 414 Q2 tags: - Greedy - Array diff --git a/solution/3200-3299/3282.Reach End of Array With Max Score/README.md b/solution/3200-3299/3282.Reach End of Array With Max Score/README.md index 191997c856634..ea3a17dcf73bc 100644 --- a/solution/3200-3299/3282.Reach End of Array With Max Score/README.md +++ b/solution/3200-3299/3282.Reach End of Array With Max Score/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 中等 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3282.Reach%20End%20of%20Array%20With%20Max%20Score/README.md +rating: 1771 +source: 第 414 场周赛 Q3 tags: - 贪心 - 数组 diff --git a/solution/3200-3299/3282.Reach End of Array With Max Score/README_EN.md b/solution/3200-3299/3282.Reach End of Array With Max Score/README_EN.md index 7e04f8d85f6d3..122cec6cdf60f 100644 --- a/solution/3200-3299/3282.Reach End of Array With Max Score/README_EN.md +++ b/solution/3200-3299/3282.Reach End of Array With Max Score/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Medium edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3282.Reach%20End%20of%20Array%20With%20Max%20Score/README_EN.md +rating: 1771 +source: Weekly Contest 414 Q3 tags: - Greedy - Array diff --git a/solution/3200-3299/3283.Maximum Number of Moves to Kill All Pawns/README.md b/solution/3200-3299/3283.Maximum Number of Moves to Kill All Pawns/README.md index 4c7f1bd8f6892..9219676ec95ec 100644 --- a/solution/3200-3299/3283.Maximum Number of Moves to Kill All Pawns/README.md +++ b/solution/3200-3299/3283.Maximum Number of Moves to Kill All Pawns/README.md @@ -2,6 +2,8 @@ comments: true difficulty: 困难 edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3283.Maximum%20Number%20of%20Moves%20to%20Kill%20All%20Pawns/README.md +rating: 2473 +source: 第 414 场周赛 Q4 tags: - 位运算 - 广度优先搜索 diff --git a/solution/3200-3299/3283.Maximum Number of Moves to Kill All Pawns/README_EN.md b/solution/3200-3299/3283.Maximum Number of Moves to Kill All Pawns/README_EN.md index 158bb0859eac8..77f307db3f7f1 100644 --- a/solution/3200-3299/3283.Maximum Number of Moves to Kill All Pawns/README_EN.md +++ b/solution/3200-3299/3283.Maximum Number of Moves to Kill All Pawns/README_EN.md @@ -2,6 +2,8 @@ comments: true difficulty: Hard edit_url: https://github.com/doocs/leetcode/edit/main/solution/3200-3299/3283.Maximum%20Number%20of%20Moves%20to%20Kill%20All%20Pawns/README_EN.md +rating: 2473 +source: Weekly Contest 414 Q4 tags: - Bit Manipulation - Breadth-First Search diff --git a/solution/3200-3299/3293.Calculate Product Final Price/README.md b/solution/3200-3299/3293.Calculate Product Final Price/README.md index 605207a1ee57a..cd49fdefaac14 100644 --- a/solution/3200-3299/3293.Calculate Product Final Price/README.md +++ b/solution/3200-3299/3293.Calculate Product Final Price/README.md @@ -8,7 +8,7 @@ tags: -# [3293. Calculate Product Final Price 🔒](https://leetcode.cn/problems/calculate-product-final-price) +# [3293. 计算产品最终价格 🔒](https://leetcode.cn/problems/calculate-product-final-price) [English Version](/solution/3200-3299/3293.Calculate%20Product%20Final%20Price/README_EN.md) @@ -16,7 +16,7 @@ tags: -
Table: Products
表:Products
+------------+---------+ @@ -26,11 +26,11 @@ tags: | category | varchar | | price | decimal | +------------+---------+ -product_id is the unique key for this table. -Each row includes the product's ID, its category, and its price. +product_id 是这张表的唯一主键。 +每一行包含产品的 ID,分类以及价格。-
Table: Discounts
表:Discounts
+------------+---------+ @@ -39,23 +39,24 @@ Each row includes the product's ID, its category, and its price. | category | varchar | | discount | int | +------------+---------+ -category is the primary key for this table. -Each row contains a product category and the percentage discount applied to that category (values range from 0 to 100). +category 是这张表的主键。 +每一行包含有一个产品分类和该分类的折扣百分比(值的范围从 0 到 100)。-
Write a solution to find the final price of each product after applying the category discount. If a product's category has no associated discount, its price remains unchanged.
+编写一个解决方案来找到每个产品使用 分类折扣 后的 最终价格。如果一个产品分类 没有关联的折扣,它的价格保持 不变。
-Return the result table ordered by product_id
in ascending order.
返回结果表以 product_id
升序 排序。
The result format is in the following example.
+结果格式如下所示。
-
Example:
+ +示例:
Input:
+输入:
-Products
table:
Products
表:
+------------+-------------+-------+ @@ -68,7 +69,7 @@ Each row contains a product category and the percentage discount applied to that +------------+-------------+-------+-
Discounts
table:
Discounts
表:
+------------+----------+ @@ -79,7 +80,7 @@ Each row contains a product category and the percentage discount applied to that +------------+----------+-
Output:
+输出:
+------------+------------+-------------+ @@ -92,15 +93,15 @@ Each row contains a product category and the percentage discount applied to that +------------+------------+-------------+-
Explanation:
+解释:
You are given an arbitrary node
from a doubly linked list, which contains nodes that have a next pointer and a previous pointer.
Return an integer array which contains the elements of the linked list in order.
+ ++
Example 1:
+ +Input: head = [1,2,3,4,5], node = 5
+ +Output: [1,2,3,4,5]
+Example 2:
+ +Input: head = [4,5,6,7,8], node = 8
+ +Output: [4,5,6,7,8]
++
Constraints:
+ +[1, 500]
.1 <= Node.val <= 1000
Node.val
.You are given an arbitrary node
from a doubly linked list, which contains nodes that have a next pointer and a previous pointer.
Return an integer array which contains the elements of the linked list in order.
+ ++
Example 1:
+ +Input: head = [1,2,3,4,5], node = 5
+ +Output: [1,2,3,4,5]
+Example 2:
+ +Input: head = [4,5,6,7,8], node = 8
+ +Output: [4,5,6,7,8]
++
Constraints:
+ +[1, 500]
.1 <= Node.val <= 1000
Node.val
.