蓝桥杯基础练习VIP-Huffuman树-题解(C语言代码) 摘要:解题思路:重复利用冒泡排序 从大到小排序注意事项:每次 最小的两个数放在最后两数组元素里参考代码:#includeint main(){ int n; int num[150]={0}; int i,…… 题解列表 2022年01月31日 0 点赞 0 评论 261 浏览 评分:0.0
Hifipsysta-1136题-C语言训练-求具有abcd=(ab+cd)2性质的四位数(C++代码)字符串转换法 摘要: ```cpp #include #include #include using namespace std; bool is_condition(int n){ strin…… 题解列表 2022年01月31日 0 点赞 0 评论 186 浏览 评分:0.0
Hifipsysta-1156题-C语言训练-阿姆斯特朗数(C++代码)字符串转换法 摘要: ```cpp #include #include #include #include using namespace std; bool is_armstrong(int n){ …… 题解列表 2022年01月31日 0 点赞 0 评论 264 浏览 评分:0.0
Hifipsysta-1152题-C语言训练-计算:t=1-1/(2*2)-1/(3*3)-...-1/(m*m)(C++代码)双函数法 摘要:注意事项: ① 使用double类型时,scanf要用"%lf"。 ② sum_fraction的遍历从2开始。 ```cpp #include #include using name…… 题解列表 2022年01月30日 0 点赞 0 评论 173 浏览 评分:0.0
[编程入门]自定义函数之整数处理(C语言) 摘要:解题思路:找出十个数中的最大和最小值,并且最小值与第一个数换,最大值与最后一个数换。注意事项:只能够交换最小值与第一个数,最大值与最后一个数,其他数顺序不能变。参考代码:#include<stdio.…… 题解列表 2022年01月30日 0 点赞 0 评论 328 浏览 评分:6.0
Hifipsysta-1137题-C语言训练-求函数值(C++代码)普通递归法 摘要:```cpp #include using namespace std; int func(int x){ int y=0; if(x==1){ y=1…… 题解列表 2022年01月30日 0 点赞 0 评论 186 浏览 评分:0.0
Hifipsysta-1133题-C语言训练-求1+2!+3!+...+N!的和(C++代码)双函数法 摘要:```cpp #include using namespace std; long long int fact(int n){ long long int prod=1; …… 题解列表 2022年01月30日 0 点赞 0 评论 371 浏览 评分:0.0
Hifipsysta-1122题-C语言训练-亲密数(C++代码)缩小样本空间法 摘要:解题思路: ① 本题如果将A和B写进两个循环同时遍历,运算复杂度会非常高基本在$$O(n^2)$$量级,因此需要考虑的是如何缩小样本空间。 ② 3000以内的任意一个整数都可能成为或者说有资格成为…… 题解列表 2022年01月30日 0 点赞 0 评论 386 浏览 评分:0.0
蛇行矩阵(暴力解法) 摘要:解题思路: 应该有更聪明的算法,我这个是根据规律暴力解题,先给矩阵赋值再遍历,时间复杂度会有点高(N^2) 观察测试案列中的矩阵 找到规律: …… 题解列表 2022年01月30日 0 点赞 0 评论 273 浏览 评分:9.9
1858: 逆序数 摘要:解题思路:注意事项:参考代码:n = int(input()) l=list(map(int,input().split())) s=0 for i in range(n-1): fo…… 题解列表 2022年01月30日 0 点赞 0 评论 163 浏览 评分:0.0