Leetcode 3137. Minimum Number of Operations to Make Word K-Periodic 1. 解题思路2. 代码实现 题目链接:3137. Minimum Number of Operations to Make Word K-Periodic
1. 解题思路
这一题的话我们只需要将原始的字符串按照k个字母为一组进行分组,…
Leetcode 3147. Taking Maximum Energy From the Mystic Dungeon 1. 解题思路2. 代码实现 题目链接:3147. Taking Maximum Energy From the Mystic Dungeon
1. 解题思路
这一题的话我们倒序看一下以各个位置作为终点时前面各个位置作为起点时的energy各是多少&am…
Leetcode 3128. Right Triangles 1. 解题思路2. 代码实现 题目链接:3128. Right Triangles
1. 解题思路
这一题的话对于任意一个位置,如果该位置为1,假设其所在行中1的个数 r i r_i ri,所在列中1的个数为 c j c_j cj&#…
Leetcode 3132. Find the Integer Added to Array II 1. 解题思路2. 代码实现 题目链接:3132. Find the Integer Added to Array II
1. 解题思路
这一题由于是统一增加了一个位移,然后再删除了两个元素,因此我们将两个数组进行排序&#x…
Leetcode 3117. Minimum Sum of Values by Dividing Array 1. 解题思路2. 代码实现 题目链接:3117. Minimum Sum of Values by Dividing Array
1. 解题思路
这一题思路上就是一个动态规划,我们只需要考察每一个元素是否需要放在当前的group当中还是作…
Leetcode 3122. Minimum Number of Operations to Satisfy Conditions 1. 解题思路2. 代码实现 题目链接:3122. Minimum Number of Operations to Satisfy Conditions
1. 解题思路
这一题就是一个动态规划的思路,我们只需要对每一列取0到9的情况各自进…
Leetcode 3128. Right Triangles 1. 解题思路2. 代码实现 题目链接:3128. Right Triangles
1. 解题思路
这一题的话对于任意一个位置,如果该位置为1,假设其所在行中1的个数 r i r_i ri,所在列中1的个数为 c j c_j cj&#…
Leetcode 3169. Count Days Without Meetings 1. 解题思路2. 代码实现 题目链接:3169. Count Days Without Meetings
1. 解题思路
这一题的话我们只需要先对meeting的时间进行一下排序,然后不断更新当前连续开会的时间即可。当某一个会议开始时&#…