题解列表
递归法(辗转相除法)求最大公约数
摘要:解题思路:用辗转相除法求最大公约数,在借助最大公约数求最小公倍数注意事项:参考代码:def yue(m,n): if n==0:return m else:return yue(n,m%n……
C++-使用动态数组,使用检查目标数组是否重复或检查原数组待输入值是否重发
摘要:解题思路:
排序:使用的普通的冒泡排序,其他的排序也可以无影响
去重:
思路1:检测目标数组是否存在与当前出原数组待输入项相等的值
思路2:检测原数组待输入项i与i-1项是否相等
注意事……
蓝桥杯2022年第十三届省赛真题-求和(c语言)
摘要:解题思路:按照a2*a1+a3*(a1+a2)+a4*(a1+a2+a3)+....+an*(a1+a2+a3+...+a(n-1))进行的计算注意事项:参考代码:#include <stdio.h>……
2042: 杨辉三角
摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;const ll N =1e3;ll a……
蓝桥杯算法训练VIP-整数平均值
摘要:解题思路:1.封装成函数,传入数据量n即可,函数返回平均值,2.函数通过循环获取输入,并累加求和,3.计算平均值,函数结果回传注意事项:此题要求得到平均值,但结果是一个整数,如例子给出的 3 4 0 ……
1100采药(dp记忆化搜索)
摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>#include<cstring>using namespace std;const int M……
2880: 计算鞍点
摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;const int N=1e3+5;typedef long long ll;ll……
2886: 图像旋转
摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;const int N=1e3+5;typedef long long ll;ll……
1242: 矩阵转置
摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;const int N=1e3+5;typedef long long ll;ll……