From 9711558b81b35d45dacccb7e67526e4c8b43237e Mon Sep 17 00:00:00 2001 From: Yang Libin Date: Sun, 17 Sep 2023 04:10:57 +0000 Subject: [PATCH] chore: add new lc problems --- .../README.md | 97 ++++++++++++++ .../README_EN.md | 89 +++++++++++++ .../2800-2899/2860.Happy Students/README.md | 95 ++++++++++++++ .../2860.Happy Students/README_EN.md | 85 +++++++++++++ .../2861.Maximum Number of Alloys/README.md | 118 ++++++++++++++++++ .../README_EN.md | 108 ++++++++++++++++ .../README.md | 95 ++++++++++++++ .../README_EN.md | 85 +++++++++++++ solution/CONTEST_README.md | 7 ++ solution/CONTEST_README_EN.md | 7 ++ solution/README.md | 4 + solution/README_EN.md | 4 + solution/summary.md | 4 + solution/summary_en.md | 4 + 14 files changed, 802 insertions(+) create mode 100644 solution/2800-2899/2859.Sum of Values at Indices With K Set Bits/README.md create mode 100644 solution/2800-2899/2859.Sum of Values at Indices With K Set Bits/README_EN.md create mode 100644 solution/2800-2899/2860.Happy Students/README.md create mode 100644 solution/2800-2899/2860.Happy Students/README_EN.md create mode 100644 solution/2800-2899/2861.Maximum Number of Alloys/README.md create mode 100644 solution/2800-2899/2861.Maximum Number of Alloys/README_EN.md create mode 100644 solution/2800-2899/2862.Maximum Element-Sum of a Complete Subset of Indices/README.md create mode 100644 solution/2800-2899/2862.Maximum Element-Sum of a Complete Subset of Indices/README_EN.md diff --git a/solution/2800-2899/2859.Sum of Values at Indices With K Set Bits/README.md b/solution/2800-2899/2859.Sum of Values at Indices With K Set Bits/README.md new file mode 100644 index 0000000000000..2cf6d04435b99 --- /dev/null +++ b/solution/2800-2899/2859.Sum of Values at Indices With K Set Bits/README.md @@ -0,0 +1,97 @@ +# [2859. 计算 K 置位下标对应元素的和](https://leetcode.cn/problems/sum-of-values-at-indices-with-k-set-bits) + +[English Version](/solution/2800-2899/2859.Sum%20of%20Values%20at%20Indices%20With%20K%20Set%20Bits/README_EN.md) + +## 题目描述 + + + +

给你一个下标从 0 开始的整数数组 nums 和一个整数 k

+ +

请你用整数形式返回 nums 中的特定元素之 ,这些特定元素满足:其对应下标的二进制表示中恰存在 k 个置位。

+ +

整数的二进制表示中的 1 就是这个整数的 置位

+ +

例如,21 的二进制表示为 10101 ,其中有 3 个置位。

+ +

 

+ +

示例 1:

+ +
+输入:nums = [5,10,1,5,2], k = 1
+输出:13
+解释:下标的二进制表示是: 
+0 = 0002
+1 = 0012
+2 = 0102
+3 = 0112
+4 = 1002 
+下标 1、2 和 4 在其二进制表示中都存在 k = 1 个置位。
+因此,答案为 nums[1] + nums[2] + nums[4] = 13 。
+ +

示例 2:

+ +
+输入:nums = [4,3,2,1], k = 2
+输出:1
+解释:下标的二进制表示是: 
+0 = 002
+1 = 012
+2 = 102
+3 = 112
+只有下标 3 的二进制表示中存在 k = 2 个置位。
+因此,答案为 nums[3] = 1 。
+
+ +

 

+ +

提示:

+ + + +## 解法 + + + + + +### **Python3** + + + +```python + +``` + +### **Java** + + + +```java + +``` + +### **C++** + +```cpp + +``` + +### **Go** + +```go + +``` + +### **...** + +``` + +``` + + diff --git a/solution/2800-2899/2859.Sum of Values at Indices With K Set Bits/README_EN.md b/solution/2800-2899/2859.Sum of Values at Indices With K Set Bits/README_EN.md new file mode 100644 index 0000000000000..ce6762e01ea38 --- /dev/null +++ b/solution/2800-2899/2859.Sum of Values at Indices With K Set Bits/README_EN.md @@ -0,0 +1,89 @@ +# [2859. Sum of Values at Indices With K Set Bits](https://leetcode.com/problems/sum-of-values-at-indices-with-k-set-bits) + +[中文文档](/solution/2800-2899/2859.Sum%20of%20Values%20at%20Indices%20With%20K%20Set%20Bits/README.md) + +## Description + +

You are given a 0-indexed integer array nums and an integer k.

+ +

Return an integer that denotes the sum of elements in nums whose corresponding indices have exactly k set bits in their binary representation.

+ +

The set bits in an integer are the 1's present when it is written in binary.

+ + + +

 

+

Example 1:

+ +
+Input: nums = [5,10,1,5,2], k = 1
+Output: 13
+Explanation: The binary representation of the indices are: 
+0 = 0002
+1 = 0012
+2 = 0102
+3 = 0112
+4 = 1002 
+Indices 1, 2, and 4 have k = 1 set bits in their binary representation.
+Hence, the answer is nums[1] + nums[2] + nums[4] = 13.
+ +

Example 2:

+ +
+Input: nums = [4,3,2,1], k = 2
+Output: 1
+Explanation: The binary representation of the indices are:
+0 = 002
+1 = 012
+2 = 102
+3 = 112
+Only index 3 has k = 2 set bits in its binary representation.
+Hence, the answer is nums[3] = 1.
+
+ +

 

+

Constraints:

+ + + +## Solutions + + + +### **Python3** + +```python + +``` + +### **Java** + +```java + +``` + +### **C++** + +```cpp + +``` + +### **Go** + +```go + +``` + +### **...** + +``` + +``` + + diff --git a/solution/2800-2899/2860.Happy Students/README.md b/solution/2800-2899/2860.Happy Students/README.md new file mode 100644 index 0000000000000..819694e76f4e0 --- /dev/null +++ b/solution/2800-2899/2860.Happy Students/README.md @@ -0,0 +1,95 @@ +# [2860. 让所有学生保持开心的分组方法数](https://leetcode.cn/problems/happy-students) + +[English Version](/solution/2800-2899/2860.Happy%20Students/README_EN.md) + +## 题目描述 + + + +

给你一个下标从 0 开始、长度为 n 的整数数组 nums ,其中 n 是班级中学生的总数。班主任希望能够在让所有学生保持开心的情况下选出一组学生:

+ +

如果能够满足下述两个条件之一,则认为第 i 位学生将会保持开心:

+ + + +

返回能够满足让所有学生保持开心的分组方法的数目。

+ +

 

+ +

示例 1:

+ +
+输入:nums = [1,1]
+输出:2
+解释:
+有两种可行的方法:
+班主任没有选中学生。
+班主任选中所有学生形成一组。 
+如果班主任仅选中一个学生来完成分组,那么两个学生都无法保持开心。因此,仅存在两种可行的方法。
+
+ +

示例 2:

+ +
+输入:nums = [6,0,3,3,6,7,2,7]
+输出:3
+解释:
+存在三种可行的方法:
+班主任选中下标为 1 的学生形成一组。
+班主任选中下标为 1、2、3、6 的学生形成一组。
+班主任选中所有学生形成一组。 
+
+ +

 

+ +

提示:

+ + + +## 解法 + + + + + +### **Python3** + + + +```python + +``` + +### **Java** + + + +```java + +``` + +### **C++** + +```cpp + +``` + +### **Go** + +```go + +``` + +### **...** + +``` + +``` + + diff --git a/solution/2800-2899/2860.Happy Students/README_EN.md b/solution/2800-2899/2860.Happy Students/README_EN.md new file mode 100644 index 0000000000000..88c3f3ca6e8d6 --- /dev/null +++ b/solution/2800-2899/2860.Happy Students/README_EN.md @@ -0,0 +1,85 @@ +# [2860. Happy Students](https://leetcode.com/problems/happy-students) + +[中文文档](/solution/2800-2899/2860.Happy%20Students/README.md) + +## Description + +

You are given a 0-indexed integer array nums of length n where n is the total number of students in the class. The class teacher tries to select a group of students so that all the students remain happy.

+ +

The ith student will become happy if one of these two conditions is met:

+ + + +

Return the number of ways to select a group of students so that everyone remains happy.

+ +

 

+

Example 1:

+ +
+Input: nums = [1,1]
+Output: 2
+Explanation: 
+The two possible ways are:
+The class teacher selects no student.
+The class teacher selects both students to form the group. 
+If the class teacher selects just one student to form a group then the both students will not be happy. Therefore, there are only two possible ways.
+
+ +

Example 2:

+ +
+Input: nums = [6,0,3,3,6,7,2,7]
+Output: 3
+Explanation: 
+The three possible ways are:
+The class teacher selects the student with index = 1 to form the group.
+The class teacher selects the students with index = 1, 2, 3, 6 to form the group.
+The class teacher selects all the students to form the group.
+
+ +

 

+

Constraints:

+ + + +## Solutions + + + +### **Python3** + +```python + +``` + +### **Java** + +```java + +``` + +### **C++** + +```cpp + +``` + +### **Go** + +```go + +``` + +### **...** + +``` + +``` + + diff --git a/solution/2800-2899/2861.Maximum Number of Alloys/README.md b/solution/2800-2899/2861.Maximum Number of Alloys/README.md new file mode 100644 index 0000000000000..aef676901c586 --- /dev/null +++ b/solution/2800-2899/2861.Maximum Number of Alloys/README.md @@ -0,0 +1,118 @@ +# [2861. 最大合金数](https://leetcode.cn/problems/maximum-number-of-alloys) + +[English Version](/solution/2800-2899/2861.Maximum%20Number%20of%20Alloys/README_EN.md) + +## 题目描述 + + + +

假设你是一家合金制造公司的老板,你的公司使用多种金属来制造合金。现在共有 n 种不同类型的金属可以使用,并且你可以使用 k 台机器来制造合金。每台机器都需要特定数量的每种金属来创建合金。

+ +

对于第 i 台机器而言,创建合金需要 composition[i][j]j 类型金属。最初,你拥有 stock[i]i 类型金属,而每购入一份 i 类型金属需要花费 cost[i] 的金钱。

+ +

给你整数 nkbudget,下标从 1 开始的二维数组 composition,两个下标从 1 开始的数组 stockcost,请你在预算不超过 budget 金钱的前提下,最大化 公司制造合金的数量。

+ +

所有合金都需要由同一台机器制造。

+ +

返回公司可以制造的最大合金数。

+ +

 

+ +

示例 1:

+ +
+输入:n = 3, k = 2, budget = 15, composition = [[1,1,1],[1,1,10]], stock = [0,0,0], cost = [1,2,3]
+输出:2
+解释:最优的方法是使用第 1 台机器来制造合金。
+要想制造 2 份合金,我们需要购买:
+- 2 份第 1 类金属。
+- 2 份第 2 类金属。
+- 2 份第 3 类金属。
+总共需要 2 * 1 + 2 * 2 + 2 * 3 = 12 的金钱,小于等于预算 15 。
+注意,我们最开始时候没有任何一类金属,所以必须买齐所有需要的金属。
+可以证明在示例条件下最多可以制造 2 份合金。
+
+ +

示例 2:

+ +
+输入:n = 3, k = 2, budget = 15, composition = [[1,1,1],[1,1,10]], stock = [0,0,100], cost = [1,2,3]
+输出:5
+解释:最优的方法是使用第 2 台机器来制造合金。 
+要想制造 5 份合金,我们需要购买: 
+- 5 份第 1 类金属。
+- 5 份第 2 类金属。 
+- 0 份第 3 类金属。 
+总共需要 5 * 1 + 5 * 2 + 0 * 3 = 15 的金钱,小于等于预算 15 。 
+可以证明在示例条件下最多可以制造 5 份合金。
+
+ +

示例 3:

+ +
+输入:n = 2, k = 3, budget = 10, composition = [[2,1],[1,2],[1,1]], stock = [1,1], cost = [5,5]
+输出:2
+解释:最优的方法是使用第 3 台机器来制造合金。
+要想制造 2 份合金,我们需要购买:
+- 1 份第 1 类金属。
+- 1 份第 2 类金属。
+总共需要 1 * 5 + 1 * 5 = 10 的金钱,小于等于预算 10 。
+可以证明在示例条件下最多可以制造 2 份合金。
+
+ +

 

+ +

提示:

+ + + +## 解法 + + + + + +### **Python3** + + + +```python + +``` + +### **Java** + + + +```java + +``` + +### **C++** + +```cpp + +``` + +### **Go** + +```go + +``` + +### **...** + +``` + +``` + + diff --git a/solution/2800-2899/2861.Maximum Number of Alloys/README_EN.md b/solution/2800-2899/2861.Maximum Number of Alloys/README_EN.md new file mode 100644 index 0000000000000..ce9a000daff47 --- /dev/null +++ b/solution/2800-2899/2861.Maximum Number of Alloys/README_EN.md @@ -0,0 +1,108 @@ +# [2861. Maximum Number of Alloys](https://leetcode.com/problems/maximum-number-of-alloys) + +[中文文档](/solution/2800-2899/2861.Maximum%20Number%20of%20Alloys/README.md) + +## Description + +

You are the owner of a company that creates alloys using various types of metals. There are n different types of metals available, and you have access to k machines that can be used to create alloys. Each machine requires a specific amount of each metal type to create an alloy.

+ +

For the ith machine to create an alloy, it needs composition[i][j] units of metal of type j. Initially, you have stock[i] units of metal type i, and purchasing one unit of metal type i costs cost[i] coins.

+ +

Given integers n, k, budget, a 1-indexed 2D array composition, and 1-indexed arrays stock and cost, your goal is to maximize the number of alloys the company can create while staying within the budget of budget coins.

+ +

All alloys must be created with the same machine.

+ +

Return the maximum number of alloys that the company can create.

+ +

 

+

Example 1:

+ +
+Input: n = 3, k = 2, budget = 15, composition = [[1,1,1],[1,1,10]], stock = [0,0,0], cost = [1,2,3]
+Output: 2
+Explanation: It is optimal to use the 1st machine to create alloys.
+To create 2 alloys we need to buy the:
+- 2 units of metal of the 1st type.
+- 2 units of metal of the 2nd type.
+- 2 units of metal of the 3rd type.
+In total, we need 2 * 1 + 2 * 2 + 2 * 3 = 12 coins, which is smaller than or equal to budget = 15.
+Notice that we have 0 units of metal of each type and we have to buy all the required units of metal.
+It can be proven that we can create at most 2 alloys.
+
+ +

Example 2:

+ +
+Input: n = 3, k = 2, budget = 15, composition = [[1,1,1],[1,1,10]], stock = [0,0,100], cost = [1,2,3]
+Output: 5
+Explanation: It is optimal to use the 2nd machine to create alloys.
+To create 5 alloys we need to buy:
+- 5 units of metal of the 1st type.
+- 5 units of metal of the 2nd type.
+- 0 units of metal of the 3rd type.
+In total, we need 5 * 1 + 5 * 2 + 0 * 3 = 15 coins, which is smaller than or equal to budget = 15.
+It can be proven that we can create at most 5 alloys.
+
+ +

Example 3:

+ +
+Input: n = 2, k = 3, budget = 10, composition = [[2,1],[1,2],[1,1]], stock = [1,1], cost = [5,5]
+Output: 2
+Explanation: It is optimal to use the 3rd machine to create alloys.
+To create 2 alloys we need to buy the:
+- 1 unit of metal of the 1st type.
+- 1 unit of metal of the 2nd type.
+In total, we need 1 * 5 + 1 * 5 = 10 coins, which is smaller than or equal to budget = 10.
+It can be proven that we can create at most 2 alloys.
+
+ +

 

+

Constraints:

+ + + +## Solutions + + + +### **Python3** + +```python + +``` + +### **Java** + +```java + +``` + +### **C++** + +```cpp + +``` + +### **Go** + +```go + +``` + +### **...** + +``` + +``` + + diff --git a/solution/2800-2899/2862.Maximum Element-Sum of a Complete Subset of Indices/README.md b/solution/2800-2899/2862.Maximum Element-Sum of a Complete Subset of Indices/README.md new file mode 100644 index 0000000000000..ac58563449006 --- /dev/null +++ b/solution/2800-2899/2862.Maximum Element-Sum of a Complete Subset of Indices/README.md @@ -0,0 +1,95 @@ +# [2862. 完全子集的最大元素和](https://leetcode.cn/problems/maximum-element-sum-of-a-complete-subset-of-indices) + +[English Version](/solution/2800-2899/2862.Maximum%20Element-Sum%20of%20a%20Complete%20Subset%20of%20Indices/README_EN.md) + +## 题目描述 + + + +

给你一个下标从 1 开始、由 n 个整数组成的数组。

+ +

如果一组数字中每对元素的乘积都是一个完全平方数,则称这组数字是一个 完全集

+ +

下标集 {1, 2, ..., n} 的子集可以表示为 {i1, i2, ..., ik},我们定义对应该子集的 元素和nums[i1] + nums[i2] + ... + nums[ik]

+ +

返回下标集 {1, 2, ..., n}完全子集 所能取到的 最大元素和

+ +

完全平方数是指可以表示为一个整数和其自身相乘的数。

+ +

 

+ +

示例 1:

+ +
+输入:nums = [8,7,3,5,7,2,4,9]
+输出:16
+解释:除了由单个下标组成的子集之外,还有两个下标集的完全子集:{1,4} 和 {2,8} 。
+与下标 1 和 4 对应的元素和等于 nums[1] + nums[4] = 8 + 5 = 13 。
+与下标 2 和 8 对应的元素和等于 nums[2] + nums[8] = 7 + 9 = 16 。
+因此,下标集的完全子集可以取到的最大元素和为 16 。
+
+ +

示例 2:

+ +
+输入:nums = [5,10,3,10,1,13,7,9,4]
+输出:19
+解释:除了由单个下标组成的子集之外,还有四个下标集的完全子集:{1,4}、{1,9}、{2,8}、{4,9} 和 {1,4,9} 。 
+与下标 1 和 4 对应的元素和等于 nums[1] + nums[4] = 5 + 10 = 15 。 
+与下标 1 和 9 对应的元素和等于 nums[1] + nums[9] = 5 + 4 = 9 。 
+与下标 2 和 8 对应的元素和等于 nums[2] + nums[8] = 10 + 9 = 19 。
+与下标 4 和 9 对应的元素和等于 nums[4] + nums[9] = 10 + 4 = 14 。 
+与下标 1、4 和 9 对应的元素和等于 nums[1] + nums[4] + nums[9] = 5 + 10 + 4 = 19 。 
+因此,下标集的完全子集可以取到的最大元素和为 19 。
+
+ +

 

+ +

提示:

+ + + +## 解法 + + + + + +### **Python3** + + + +```python + +``` + +### **Java** + + + +```java + +``` + +### **C++** + +```cpp + +``` + +### **Go** + +```go + +``` + +### **...** + +``` + +``` + + diff --git a/solution/2800-2899/2862.Maximum Element-Sum of a Complete Subset of Indices/README_EN.md b/solution/2800-2899/2862.Maximum Element-Sum of a Complete Subset of Indices/README_EN.md new file mode 100644 index 0000000000000..62133de4d84dc --- /dev/null +++ b/solution/2800-2899/2862.Maximum Element-Sum of a Complete Subset of Indices/README_EN.md @@ -0,0 +1,85 @@ +# [2862. Maximum Element-Sum of a Complete Subset of Indices](https://leetcode.com/problems/maximum-element-sum-of-a-complete-subset-of-indices) + +[中文文档](/solution/2800-2899/2862.Maximum%20Element-Sum%20of%20a%20Complete%20Subset%20of%20Indices/README.md) + +## Description + +

You are given a 1-indexed array nums of n integers.

+ +

A set of numbers is complete if the product of every pair of its elements is a perfect square.

+ +

For a subset of the indices set {1, 2, ..., n} represented as {i1, i2, ..., ik}, we define its element-sum as: nums[i1] + nums[i2] + ... + nums[ik].

+ +

Return the maximum element-sum of a complete subset of the indices set {1, 2, ..., n}.

+ +

A perfect square is a number that can be expressed as the product of an integer by itself.

+ +

 

+

Example 1:

+ +
+Input: nums = [8,7,3,5,7,2,4,9]
+Output: 16
+Explanation: Apart from the subsets consisting of a single index, there are two other complete subsets of indices: {1,4} and {2,8}.
+The sum of the elements corresponding to indices 1 and 4 is equal to nums[1] + nums[4] = 8 + 5 = 13.
+The sum of the elements corresponding to indices 2 and 8 is equal to nums[2] + nums[8] = 7 + 9 = 16.
+Hence, the maximum element-sum of a complete subset of indices is 16.
+
+ +

Example 2:

+ +
+Input: nums = [5,10,3,10,1,13,7,9,4]
+Output: 19
+Explanation: Apart from the subsets consisting of a single index, there are four other complete subsets of indices: {1,4}, {1,9}, {2,8}, {4,9}, and {1,4,9}.
+The sum of the elements conrresponding to indices 1 and 4 is equal to nums[1] + nums[4] = 5 + 10 = 15.
+The sum of the elements conrresponding to indices 1 and 9 is equal to nums[1] + nums[9] = 5 + 4 = 9.
+The sum of the elements conrresponding to indices 2 and 8 is equal to nums[2] + nums[8] = 10 + 9 = 19.
+The sum of the elements conrresponding to indices 4 and 9 is equal to nums[4] + nums[9] = 10 + 4 = 14.
+The sum of the elements conrresponding to indices 1, 4, and 9 is equal to nums[1] + nums[4] + nums[9] = 5 + 10 + 4 = 19.
+Hence, the maximum element-sum of a complete subset of indices is 19.
+
+ +

 

+

Constraints:

+ + + +## Solutions + + + +### **Python3** + +```python + +``` + +### **Java** + +```java + +``` + +### **C++** + +```cpp + +``` + +### **Go** + +```go + +``` + +### **...** + +``` + +``` + + diff --git a/solution/CONTEST_README.md b/solution/CONTEST_README.md index c0c2988da72ce..17ce98f042ec5 100644 --- a/solution/CONTEST_README.md +++ b/solution/CONTEST_README.md @@ -22,6 +22,13 @@ ## 往期竞赛 +#### 第 363 场周赛(2023-09-17 10:30, 90 分钟) 参赛人数 4768 + +- [2859. 计算 K 置位下标对应元素的和](/solution/2800-2899/2859.Sum%20of%20Values%20at%20Indices%20With%20K%20Set%20Bits/README.md) +- [2860. 让所有学生保持开心的分组方法数](/solution/2800-2899/2860.Happy%20Students/README.md) +- [2861. 最大合金数](/solution/2800-2899/2861.Maximum%20Number%20of%20Alloys/README.md) +- [2862. 完全子集的最大元素和](/solution/2800-2899/2862.Maximum%20Element-Sum%20of%20a%20Complete%20Subset%20of%20Indices/README.md) + #### 第 113 场双周赛(2023-09-16 22:30, 90 分钟) 参赛人数 3028 - [2855. 使数组成为递增数组的最少右移次数](/solution/2800-2899/2855.Minimum%20Right%20Shifts%20to%20Sort%20the%20Array/README.md) diff --git a/solution/CONTEST_README_EN.md b/solution/CONTEST_README_EN.md index 7d011814c92c7..f625b437840af 100644 --- a/solution/CONTEST_README_EN.md +++ b/solution/CONTEST_README_EN.md @@ -25,6 +25,13 @@ Get your rating changes right after the completion of LeetCode contests, https:/ ## Past Contests +#### Weekly Contest 363 + +- [2859. Sum of Values at Indices With K Set Bits](/solution/2800-2899/2859.Sum%20of%20Values%20at%20Indices%20With%20K%20Set%20Bits/README_EN.md) +- [2860. Happy Students](/solution/2800-2899/2860.Happy%20Students/README_EN.md) +- [2861. Maximum Number of Alloys](/solution/2800-2899/2861.Maximum%20Number%20of%20Alloys/README_EN.md) +- [2862. Maximum Element-Sum of a Complete Subset of Indices](/solution/2800-2899/2862.Maximum%20Element-Sum%20of%20a%20Complete%20Subset%20of%20Indices/README_EN.md) + #### Biweekly Contest 113 - [2855. Minimum Right Shifts to Sort the Array](/solution/2800-2899/2855.Minimum%20Right%20Shifts%20to%20Sort%20the%20Array/README_EN.md) diff --git a/solution/README.md b/solution/README.md index e65182ff5a604..7a64b739382be 100644 --- a/solution/README.md +++ b/solution/README.md @@ -2869,6 +2869,10 @@ | 2856 | [删除数对后的最小数组长度](/solution/2800-2899/2856.Minimum%20Array%20Length%20After%20Pair%20Removals/README.md) | | 中等 | 第 113 场双周赛 | | 2857 | [统计距离为 k 的点对](/solution/2800-2899/2857.Count%20Pairs%20of%20Points%20With%20Distance%20k/README.md) | | 中等 | 第 113 场双周赛 | | 2858 | [可以到达每一个节点的最少边反转次数](/solution/2800-2899/2858.Minimum%20Edge%20Reversals%20So%20Every%20Node%20Is%20Reachable/README.md) | | 困难 | 第 113 场双周赛 | +| 2859 | [计算 K 置位下标对应元素的和](/solution/2800-2899/2859.Sum%20of%20Values%20at%20Indices%20With%20K%20Set%20Bits/README.md) | | 简单 | 第 363 场周赛 | +| 2860 | [让所有学生保持开心的分组方法数](/solution/2800-2899/2860.Happy%20Students/README.md) | | 中等 | 第 363 场周赛 | +| 2861 | [最大合金数](/solution/2800-2899/2861.Maximum%20Number%20of%20Alloys/README.md) | | 中等 | 第 363 场周赛 | +| 2862 | [完全子集的最大元素和](/solution/2800-2899/2862.Maximum%20Element-Sum%20of%20a%20Complete%20Subset%20of%20Indices/README.md) | | 困难 | 第 363 场周赛 | ## 版权 diff --git a/solution/README_EN.md b/solution/README_EN.md index 38d6bfbc0a09c..d0da7b40736bb 100644 --- a/solution/README_EN.md +++ b/solution/README_EN.md @@ -2867,6 +2867,10 @@ Press Control+F(or Command+F on the | 2856 | [Minimum Array Length After Pair Removals](/solution/2800-2899/2856.Minimum%20Array%20Length%20After%20Pair%20Removals/README_EN.md) | | Medium | Biweekly Contest 113 | | 2857 | [Count Pairs of Points With Distance k](/solution/2800-2899/2857.Count%20Pairs%20of%20Points%20With%20Distance%20k/README_EN.md) | | Medium | Biweekly Contest 113 | | 2858 | [Minimum Edge Reversals So Every Node Is Reachable](/solution/2800-2899/2858.Minimum%20Edge%20Reversals%20So%20Every%20Node%20Is%20Reachable/README_EN.md) | | Hard | Biweekly Contest 113 | +| 2859 | [Sum of Values at Indices With K Set Bits](/solution/2800-2899/2859.Sum%20of%20Values%20at%20Indices%20With%20K%20Set%20Bits/README_EN.md) | | Easy | Weekly Contest 363 | +| 2860 | [Happy Students](/solution/2800-2899/2860.Happy%20Students/README_EN.md) | | Medium | Weekly Contest 363 | +| 2861 | [Maximum Number of Alloys](/solution/2800-2899/2861.Maximum%20Number%20of%20Alloys/README_EN.md) | | Medium | Weekly Contest 363 | +| 2862 | [Maximum Element-Sum of a Complete Subset of Indices](/solution/2800-2899/2862.Maximum%20Element-Sum%20of%20a%20Complete%20Subset%20of%20Indices/README_EN.md) | | Hard | Weekly Contest 363 | ## Copyright diff --git a/solution/summary.md b/solution/summary.md index 7bdedad7ca7b6..b3669d27b7fe4 100644 --- a/solution/summary.md +++ b/solution/summary.md @@ -2914,3 +2914,7 @@ - [2856.删除数对后的最小数组长度](/solution/2800-2899/2856.Minimum%20Array%20Length%20After%20Pair%20Removals/README.md) - [2857.统计距离为 k 的点对](/solution/2800-2899/2857.Count%20Pairs%20of%20Points%20With%20Distance%20k/README.md) - [2858.可以到达每一个节点的最少边反转次数](/solution/2800-2899/2858.Minimum%20Edge%20Reversals%20So%20Every%20Node%20Is%20Reachable/README.md) + - [2859.计算 K 置位下标对应元素的和](/solution/2800-2899/2859.Sum%20of%20Values%20at%20Indices%20With%20K%20Set%20Bits/README.md) + - [2860.让所有学生保持开心的分组方法数](/solution/2800-2899/2860.Happy%20Students/README.md) + - [2861.最大合金数](/solution/2800-2899/2861.Maximum%20Number%20of%20Alloys/README.md) + - [2862.完全子集的最大元素和](/solution/2800-2899/2862.Maximum%20Element-Sum%20of%20a%20Complete%20Subset%20of%20Indices/README.md) diff --git a/solution/summary_en.md b/solution/summary_en.md index b854fc88ccc12..23d7b31e1e73a 100644 --- a/solution/summary_en.md +++ b/solution/summary_en.md @@ -2914,3 +2914,7 @@ - [2856.Minimum Array Length After Pair Removals](/solution/2800-2899/2856.Minimum%20Array%20Length%20After%20Pair%20Removals/README_EN.md) - [2857.Count Pairs of Points With Distance k](/solution/2800-2899/2857.Count%20Pairs%20of%20Points%20With%20Distance%20k/README_EN.md) - [2858.Minimum Edge Reversals So Every Node Is Reachable](/solution/2800-2899/2858.Minimum%20Edge%20Reversals%20So%20Every%20Node%20Is%20Reachable/README_EN.md) + - [2859.Sum of Values at Indices With K Set Bits](/solution/2800-2899/2859.Sum%20of%20Values%20at%20Indices%20With%20K%20Set%20Bits/README_EN.md) + - [2860.Happy Students](/solution/2800-2899/2860.Happy%20Students/README_EN.md) + - [2861.Maximum Number of Alloys](/solution/2800-2899/2861.Maximum%20Number%20of%20Alloys/README_EN.md) + - [2862.Maximum Element-Sum of a Complete Subset of Indices](/solution/2800-2899/2862.Maximum%20Element-Sum%20of%20a%20Complete%20Subset%20of%20Indices/README_EN.md)