C语言训练-排序问题<1> 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int a[15];int main(){ for(int i=0;i<4;i++)…… 题解列表 2022年05月03日 0 点赞 0 评论 316 浏览 评分:0.0
[编程入门]三个数字的排序 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int a[15];int main(){ for(int i=0;i<3;i++)…… 题解列表 2022年05月03日 0 点赞 0 评论 334 浏览 评分:0.0
快速排序练习 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int a[100005],n;int main(){ cin>>n; for…… 题解列表 2022年05月03日 0 点赞 0 评论 506 浏览 评分:0.0
蓝桥杯算法提高VIP-队列操作 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;queue<int>q;int n,a,b;int main(){ cin>>…… 题解列表 2022年05月03日 0 点赞 0 评论 430 浏览 评分:0.0
优质题解 仅利用二维数组控制行列之和解决蛇形矩阵 摘要:解题思路:1 3 6 10 152 5 9 144 8 137 1211首先定义二维数组num[5][5],根据数字递增的规律观察行列之和的关系;a[0][0]=1(行+列=0)a[1][0]=2 a…… 题解列表 2022年05月03日 1 点赞 7 评论 1483 浏览 评分:8.5
信息学奥赛一本通T1547-区间和-题解(C语言代码) 摘要:```c #include #include long*l; long f(int x){ *l=0; do *l+=l[x]; while(x-=x&-x); return …… 题解列表 2022年05月03日 0 点赞 0 评论 791 浏览 评分:8.0
信息学奥赛一本通T1541-数列区间最大值-题解(C++代码) 摘要:```c++ #include using namespace std; int main(){ int n,m; scanf("%d%d",&n,&m); int k=-~__lg…… 题解列表 2022年05月03日 0 点赞 0 评论 648 浏览 评分:9.1
[编程入门]数组插入处理 摘要:解题思路:把新的插入变量带入兑换为其中一个比他大的量然后交换以此类推注意事项:参考代码:#include<stdio.h>int main(){ int s[9],i,t,x; for(i=0;i<9…… 题解列表 2022年05月03日 0 点赞 0 评论 316 浏览 评分:0.0
利用递归函数来求阶乘 摘要:解题思路:先定义一个函数,用递归思想求一个数的阶乘,再用for循环求1~30的每个数的阶乘,最后注意%.2e表示科学计数法并且保留两位小数注意事项:参考代码:def func(x): if x=…… 题解列表 2022年05月02日 0 点赞 0 评论 559 浏览 评分:0.0
C++ 最小绝对值 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cmath>using namespace std;int main(){ int a[10], i = 0, te…… 题解列表 2022年05月02日 0 点赞 0 评论 559 浏览 评分:0.0