双指针 时间复杂度O(n + m) 摘要:``` #include #define debug(x) cout s >> A >> B; for (int i = 0; i < s.size(); i ++) { if …… 题解列表 2024年03月23日 0 点赞 0 评论 660 浏览 评分:9.9
蓝桥杯2023年第十四届省赛真题-子串简写 摘要:解题思路:注意事项:参考代码:常人思路(超时)#include <bits/stdc++.h> using namespace std;int K;long long ans=0;string S;c…… 题解列表 2024年04月02日 2 点赞 0 评论 870 浏览 评分:9.9
子串简写 二分法代码 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>#define int long longusing namespace std;void solve(){ int k;s…… 题解列表 2024年01月30日 0 点赞 0 评论 749 浏览 评分:9.5
[蓝桥杯2023年第十四届省赛真题-子串简写] 一次循环方法 摘要:十年OI一场空 不开long long见祖宗参考代码:#include <bits/stdc++.h>using namespace std;int main(void) { string s;…… 题解列表 2023年11月06日 0 点赞 5 评论 1116 浏览 评分:9.4
蓝桥杯2023年第十四届省赛真题-子串简写(超时改写) 摘要:参考代码:/*超时!!!!! #include<iostream> using namespace std; int main() { int k; char c1,c2;…… 题解列表 2024年01月14日 0 点赞 0 评论 819 浏览 评分:9.4
蓝桥杯2023年第十四届省赛真题-子串简写 最短解题 摘要:解题思路:注意事项: 你就说短不短吧参考代码:#include"bits/stdc++.h"i…… 题解列表 2025年03月09日 8 点赞 0 评论 540 浏览 评分:9.0
蓝桥杯2023年第十四届省赛真题-子串简写(DP) 摘要:# ***解题思路*** 公式显示有问题,直接放图 -----------…… 题解列表 2023年04月09日 0 点赞 3 评论 1859 浏览 评分:8.3
子串简写 树状数组 O(nlogn)复杂度 43ms 摘要:解题思路:题目规定了,需要用找出以c1开头和c2开头并且长度需要超过k的子串数目,考虑当结尾加入一个c2结尾的字符时,他会和所有开头为c1的,并且长度不超过k的字符形成子串,那么可以这样考虑每当扫描到…… 题解列表 2024年04月07日 0 点赞 0 评论 323 浏览 评分:8.0
蓝桥杯2023年第十四届省赛真题-子串简写 摘要:解题思路:观察题目可以发现,我们发现第i个是c2可以组成的子串数量[0,i-k]这个区间内c1的数量,所有我们只需要找到每个c2(假设下标为i)[0,i-k]这个区间内c1的数量就可以得到答案。但是观…… 题解列表 2023年07月27日 0 点赞 2 评论 769 浏览 评分:6.0
暴力写法优化 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ long re=0; …… 题解列表 2025年04月11日 0 点赞 0 评论 140 浏览 评分:0.0