摘要: P5707 【深基2.例12】上学迟到 题目链接:https://www.luogu.com.cn/problem/P5707 题解代码: #include <bits/stdc++.h> using namespace std; int main() { int s, v; cin >> s >> 阅读全文
posted @ 2024-12-09 17:35 fufuaifufu 阅读(0) 评论(0) 推荐(0) 编辑
摘要: 题目链接:https://leetcode.cn/problems/identify-the-largest-outlier-in-an-array/description/ 题解代码: class Solution { public: int getLargestOutlier(std::vect 阅读全文
posted @ 2024-12-05 17:37 fufuaifufu 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 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 阅读(12) 评论(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 阅读(8) 评论(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 阅读(7) 评论(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 阅读(7) 评论(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 阅读(7) 评论(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) 编辑