C语言训练-排序问题(2) 摘要:解题思路: 用qsort函数快速排序,打好基础,方便以后的解题。注意事项: 记得用stdlib.h头文件参考代码:#incl 题解列表 2024年02月07日 0 点赞 0 评论 192 浏览 评分:0.0
C语言训练-排序问题(2) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<math.h> #include<stdlib.h> int compare(const void *a,co…… 题解列表 2024年02月07日 0 点赞 0 评论 222 浏览 评分:0.0
2529: NOIP2012-同余方程-了解即可 摘要:# 2529: 信息学奥赛一本通T1632-NOIP2012-同余方程 ## 数学知识 这里其实就是在求数论逆元。数论逆元最常见的求法就是扩展欧几里得算法,实际上就是裴蜀定理。裴蜀定理的代码实现较…… 题解列表 2024年02月07日 0 点赞 0 评论 259 浏览 评分:0.0
蓝桥杯算法训练VIP-比较字符串 摘要:解题思路:先算俩字符串字符个数,记为am,bm;再分俩种情况讨论(am=bm和am!=bm)注意事项:参考代码:#include<stdio.h>#include<string.h>// 是 C 语言…… 题解列表 2024年02月07日 0 点赞 0 评论 169 浏览 评分:0.0
编写题解 1026: [编程入门]数字逆序输出 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,a[10]; for(i=0;i<10;i++){ scanf("%d",&a[i]); } fo…… 题解列表 2024年02月07日 0 点赞 0 评论 234 浏览 评分:0.0
编写题解 1029: [编程入门]自定义函数处理素数 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int i,n,N; scanf("%d",&i); for(n=2;n<=i;n++){ i…… 题解列表 2024年02月07日 0 点赞 0 评论 203 浏览 评分:0.0
编写题解 1030: [编程入门]二维数组的转置 摘要:解题思路:转置是线性代数里面的知识,就是把行变为列。如题第一列1 4 7变为第一行,以此类推;注意事项:参考代码:#include<stdio.h>int main(){ int i,j,a[3][3…… 题解列表 2024年02月07日 0 点赞 0 评论 167 浏览 评分:0.0
1028: [编程入门]自定义函数求一元二次方程 摘要:解题思路:这段代码是用C语言编写的,用于求解二次方程的根。二次方程的形式为ax^2 + bx + c = 0。代码中定义了三个函数:root_above、root_equal和root_belove,…… 题解列表 2024年02月07日 0 点赞 0 评论 272 浏览 评分:0.0
河中跳房子(C++) 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int L,N,M,a[10000];int f(int x){ int ans=0,t=0…… 题解列表 2024年02月08日 0 点赞 0 评论 296 浏览 评分:0.0
求和训练题解 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a, b, c; int max = 0;//这里我们创建一个最大值的变量 double count =…… 题解列表 2024年02月08日 0 点赞 0 评论 136 浏览 评分:0.0