[编程入门]链表合并 60行不到解决战斗 #**[编程入门]链表合并**#includetypedefstructst{intid;intscore;structst*pnext;}st;st*cre(intm,intn){st*head=(st*)malloc(sizeof(st));if(!head)returnNULL;head->pn 题解列表 2023年01月13日 0 点赞 0 评论 460 浏览 评分:9.9
关于数字后移问题本质是下表和元素的关系 摘要:解题思路:就是下标和元素的关系注重好,画个图就可以自己看明白了注意事项:下标越界参考代码:#include <stdio.h>void f(){ int nums[50] ; int n ; scan…… 题解列表 2023年01月13日 0 点赞 0 评论 485 浏览 评分:9.9
容易看懂c语言 摘要:解题思路:两个数据有联系,用结构体 ,用冒泡法排序注意事项:交换的中间变量要为相同的结构体类型参考代码:#include<stdio.h>#include<string.h>typedef struc…… 题解列表 2023年01月13日 0 点赞 0 评论 572 浏览 评分:0.0
陶陶摘苹果(水题) ```c#includeintmain(){inta[11],i,n,cnt=0;for(i=0;i 题解列表 2023年01月13日 0 点赞 0 评论 576 浏览 评分:6.0
十->二进制转换 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<math.h> int main(){ int t,a[10000],n,i,j; while(scan…… 题解列表 2023年01月12日 0 点赞 0 评论 824 浏览 评分:9.9
123 二分+数学 ```//a[n]=(n)*(n+1)/2,随着x的增大,一定存在一个a【i】的位数是小于x的最大值,因为==x情况也满足》a【i】,st》x数更是大于ai,所以满足二分条件,寻找到小于x的最大值为l,所以答案为s【l】+a【x-a【l】】#includeusingnamespacestd;typed 题解列表 2023年01月12日 0 点赞 0 评论 861 浏览 评分:6.0
蛇行矩阵(水题) 摘要:```c #include int main(){ int n,i,j,k=1,l,h=2; scanf("%d",&n); for(i=0;i…… 题解列表 2023年01月12日 0 点赞 0 评论 595 浏览 评分:9.9
选择排序思想解题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>#include<windows.h>int main(){ int l,m,min; …… 题解列表 2023年01月12日 0 点赞 0 评论 489 浏览 评分:0.0
输出最高分数的学生姓名 摘要:解题思路:注意事项:参考代码:#include<stdio.h>struct student{ int score; char name[100];}a[1000];int main(){…… 题解列表 2023年01月12日 0 点赞 0 评论 441 浏览 评分:0.0
The 3n + 1 problem(水题) ```c#includeintfun(intn){intcnt=0;do{if(n%2==0){n/=2;cnt++;}else{n=n*3+1;cnt++;}}while(n!=1);returncnt+1;}intmain(){inti, 题解列表 2023年01月12日 0 点赞 0 评论 560 浏览 评分:9.9