蓝桥杯算法训练-未名湖边的烦恼 摘要:参考代码:#include<iostream> using namespace std; int f(int m, int n) { if (m < n) return 0; …… 题解列表 2021年02月23日 0 点赞 0 评论 391 浏览 评分:0.0
二叉排序树的基本操作(C++) 摘要: #include #include typedef struct treenode { int data; struct …… 题解列表 2021年02月23日 0 点赞 0 评论 738 浏览 评分:0.0
优质题解 (AC代码)蓝桥杯算法提高VIP-统计单词数:用vector模拟unordered_map解法以及unordered_map解法 摘要:解题思路:创建一个拥有String和int类型的结构体(node)存储其单词和出现的次数,用istringstream将句子按空格分割化成单词存储在vector中,利用STL函数std::transf…… 题解列表 2021年02月23日 0 点赞 2 评论 814 浏览 评分:9.9
C++(DFS)超简单 摘要:解题思路: 题目不满足条件只有第一位不能为零,和连续两个零,故条件并不复杂,直接dfs参考代码:#include<iostream> using namespace std; int N, …… 题解列表 2021年02月23日 0 点赞 1 评论 1437 浏览 评分:9.0
[编程入门]最大公约数与最小公倍数-题解(C++代码) 摘要:解题思路:此题是求最大公约数和最小公倍数,因此对于最大公约数,我们应该选择先把两者中较小数假定为最大公约数,如果不成立则一直对其进行减操作,直到找到最大公约数;对于最小公倍数,我们应该选择先把两者中较…… 题解列表 2021年02月22日 0 点赞 0 评论 1005 浏览 评分:9.9
记忆化搜索解法-题解(C++) 摘要: # Part 1 爆搜 万物皆可暴力,这道题我们不妨先打一个暴力。 这里我使用了爆搜: ```cpp #include using namespace std; cons…… 题解列表 2021年02月22日 0 点赞 1 评论 642 浏览 评分:9.9
蓝桥杯算法训练-素因子去重-题解(C++代码) 摘要:参考代码:#include<iostream> using namespace std; int main() { long long n, p = 1; cin >> n; f…… 题解列表 2021年02月21日 0 点赞 0 评论 418 浏览 评分:0.0
蓝桥杯算法训练-1的个数-题解(C++代码) 摘要:参考代码:#include<iostream> #include<string> #include<sstream> using namespace std; int main() { …… 题解列表 2021年02月21日 0 点赞 0 评论 318 浏览 评分:0.0
数组排序 -题解(C++代码)STL+vector 摘要:```javascript #include using namespace std; const int N=1e3; int cmp(int a,int b) { return a>…… 题解列表 2021年02月21日 0 点赞 0 评论 1053 浏览 评分:9.9
IP判断-题解(C++代码) 摘要:解题思路:感觉自己可能写的有点麻烦,我是先保存输入的字符串,用一个bool类型保存中途判断的结果,默认为false(为true的话有点坑,吃了不少亏)然后遍历这个字符串,首先截取不含小数点的部分,同时…… 题解列表 2021年02月20日 0 点赞 0 评论 373 浏览 评分:0.0