11 2024 档案

摘要:1456.定长子串中元音的最大数目 题目链接:https://leetcode.cn/problems/maximum-number-of-vowels-in-a-substring-of-given-length/description/ 题解代码: class Solution { public 阅读全文
posted @ 2024-11-29 00:02 fufuaifufu 阅读(28) 评论(0) 推荐(0) 编辑
摘要:B2. The Strict Teacher (Hard Version) 题目链接:https://codeforces.com/contest/2005/problem/B2 题解代码: #include<bits/stdc++.h> using namespace std; int main( 阅读全文
posted @ 2024-11-24 16:40 fufuaifufu 阅读(6) 评论(0) 推荐(0) 编辑
摘要:元素和小于等于 k 的子矩阵的数目 题目链接:https://leetcode.cn/problems/count-submatrices-with-top-left-element-and-sum-less-than-k/description/ 题解代码: class Solution { pu 阅读全文
posted @ 2024-11-22 01:16 fufuaifufu 阅读(10) 评论(0) 推荐(1) 编辑
摘要:1108.IP 地址无效化 题目链接:https://leetcode.cn/problems/defanging-an-ip-address/description/ 题解代码: class Solution { public: string defangIPaddr(string address 阅读全文
posted @ 2024-11-20 01:37 fufuaifufu 阅读(3) 评论(0) 推荐(0) 编辑
摘要:504.七进制数 题目链接:https://leetcode.cn/problems/base-7/description/ 题解代码: class Solution { public: string convertToBase7(int num) { string nums; int a=abs( 阅读全文
posted @ 2024-11-20 01:34 fufuaifufu 阅读(12) 评论(0) 推荐(0) 编辑
摘要:1109.航班预订统计 题目链接:https://leetcode.cn/problems/corporate-flight-bookings/description/ 题解代码: class Solution { public: vector<int> corpFlightBookings(vec 阅读全文
posted @ 2024-11-19 20:43 fufuaifufu 阅读(8) 评论(0) 推荐(0) 编辑
摘要:零数组变换 I 题目链接:https://leetcode.cn/problems/zero-array-transformation-i/description/ 题解代码: class Solution { public: bool isZeroArray(vector<int>& nums, 阅读全文
posted @ 2024-11-17 17:26 fufuaifufu 阅读(8) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://www.luogu.com.cn/problem/P1102 题解代码: //双指针 #include<bits/stdc++.h> using namespace std; const int MAX = 2 * 10e5 + 10; int n, c, nums[MAX 阅读全文
posted @ 2024-11-16 01:45 fufuaifufu 阅读(5) 评论(0) 推荐(1) 编辑
摘要:题目链接:https://www.luogu.com.cn/problem/P2249 题解代码: #include<iostream> using namespace std; int n, m, q, a[1000005]; int find(int x); int main() { cin > 阅读全文
posted @ 2024-11-15 02:45 fufuaifufu 阅读(16) 评论(0) 推荐(0) 编辑
摘要:题目链接:https://leetcode.cn/problems/adjacent-increasing-subarrays-detection-ii/ 题解代码: int maxIncreasingSubarrays(int* nums, int numsSize) { int ans = 0, 阅读全文
posted @ 2024-11-14 00:31 fufuaifufu 阅读(14) 评论(0) 推荐(1) 编辑
摘要:题目链接: https://leetcode.cn/problems/minimum-element-after-replacement-with-digit-sum/ 题解代码: int minElement(int* nums, int numsSize) { int temp=10000; w 阅读全文
posted @ 2024-11-12 21:56 fufuaifufu 阅读(7) 评论(0) 推荐(0) 编辑