统计子矩阵(双指针) 摘要:解题思路:/*解题思路*//*使用双指针 将A数组中的任意俩列的前缀和看做一个一维数组求解*//*在一维数组中 a[n]={a[1],a[2],...,a[n]}; 类似题目 求其中不大于k:9的数组…… 题解列表 2023年03月30日 0 点赞 0 评论 1205 浏览 评分:8.9
1434: 蓝桥杯历届试题-回文数字 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;bool huiwen(int x,int g){ int y=0,sum=0; int t=…… 题解列表 2023年03月29日 0 点赞 0 评论 335 浏览 评分:0.0
动态规划,清晰代码 摘要:解题思路:注意事项:参考代码:#include <iostream> #include <unordered_map> int main() { int n, m ,x; s…… 题解列表 2023年03月29日 0 点赞 0 评论 869 浏览 评分:6.0
BFS+康托压缩 摘要:解题思路:注意事项:参考代码:#includeusing namespace std;string s1,s2;int a[5][5],b[5][5];int jiecheng[10]={1,1,2,…… 题解列表 2023年03月29日 0 点赞 0 评论 597 浏览 评分:9.9
#C++2664——蓝桥杯2022年第十三届省赛真题-求和 摘要:解题思路:***********************************************************************************************…… 题解列表 2023年03月29日 0 点赞 0 评论 503 浏览 评分:0.0
记忆化搜索博弈树 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int n,len;unordered_map<string,int> vis;//…… 题解列表 2023年03月29日 0 点赞 0 评论 430 浏览 评分:9.9
检查一个数是否为质数 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;bool is_prime(int x){ if(x < 2)return false…… 题解列表 2023年03月29日 0 点赞 0 评论 448 浏览 评分:0.0
线段树+二分,时间复杂度O(nlognlogn) 摘要:解题思路:见注释注意事项:参考代码:#include<bits/stdc++.h>//当数组中已经存在1时,设1的数量为numof1,显然每更新一次可以让一个不为1的数变为1,且最多可以让一个不为1的…… 题解列表 2023年03月29日 0 点赞 0 评论 1326 浏览 评分:9.3
只用最多7次循环,简单易懂 摘要:解题思路:既然每周做的题目是固定的,又知道总和,我们是否可以直接让总和/每周做的题目,得到做了多少个满周,剩下的再按一周的情况(周一至周五加a其余加b)来循环检查呢。注意事项:总和/每周做的题目可能正…… 题解列表 2023年03月28日 0 点赞 0 评论 325 浏览 评分:0.0
二分+floyed算法 摘要:解题思路:floyed算法求所有点对最短距离,用二分算法求答案。时间复杂度:O(n^3*log(n*50000))注意事项:参考代码:#includeusing namespace std;#defi…… 题解列表 2023年03月28日 0 点赞 0 评论 589 浏览 评分:9.9