[编程入门]三个数字的排序(C语言简单易懂) 摘要:解题思路:输入三个数,通过循环交换赋值得出要求排序的对应赋值。注意事项:此题要求从小到大输出,即升序,若要得到降序结果,可以将printf中地址c,b,a改为a,b,c。参考代码:#include<s…… 题解列表 2024年06月21日 2 点赞 1 评论 633 浏览 评分:9.9
【编程入门】字符串分类统计 摘要:参考代码:#include <stdio.h>intmain(void){ int letter = 0, number = 0, space = 0, other = 0; char c…… 题解列表 2024年06月21日 0 点赞 0 评论 464 浏览 评分:9.9
【编程入门】自定义函数之字符串反转 摘要:参考代码:#include<stdio.h>#include<string.h> int exchange(char a[],char b[]){ int i,l,j = 0; l = s…… 题解列表 2024年06月21日 0 点赞 0 评论 260 浏览 评分:9.9
求矩阵的两对角线上的元素之和 摘要:参考代码:#include<stdio.h>int main(){ int x,y,sum=0,N,a[10][10]; scanf("%d",&N); for(x=0;x<N;x++){…… 题解列表 2024年06月22日 0 点赞 0 评论 340 浏览 评分:9.9
C语言训练-大小写问题 摘要:参考代码:#include <stdio.h>#include<ctype.h>#include<string.h>int main(){ char a[100] = {'\0'}…… 题解列表 2024年06月22日 0 点赞 0 评论 466 浏览 评分:9.9
顺序栈练习,可供食用 摘要:解题思路:简陋代码但还算简单,可供食用参考。注意事项:①清理缓冲区换行符。 ②题目要求:一次开始时堆栈为空。参考代码:#include#include#include#i…… 题解列表 2024年06月23日 0 点赞 0 评论 297 浏览 评分:9.9
链式栈的练习,可供食用参考... 摘要:解题思路:无注意事项:无参考代码:#include<stdio.h>#include<stdlib.h>#include<stdbool.h>#include<string.h>typedef str…… 题解列表 2024年06月23日 0 点赞 0 评论 312 浏览 评分:9.9
数列(多项式之和) 摘要:解题思路: 转二进制: 多项式之和注意事项:参考代码:#include<iostream> using namespace std; const int N = 1e3 + 10; int a[…… 题解列表 2024年06月23日 2 点赞 1 评论 519 浏览 评分:9.9
tarjan的离线做法 摘要:刚学习tarjan求最近公共祖先,以此题记录 要求的两点距离可用两点深度之和减去两点公共祖先节点的深度,即: d[x,y]=d[0,x]+d[0,y]-2*d[0,p] ~~~ #incl…… 题解列表 2024年06月24日 0 点赞 0 评论 285 浏览 评分:9.9
输入两个正整数m和n,求其最大公约数和最小公倍数。 摘要:解题思路:接受输入,先求最大公约数,最后求公倍数,然后输出注意事项:按顺序求解即可参考代码:#include<iostream> #include <cstring> #include <math…… 题解列表 2024年06月25日 0 点赞 0 评论 297 浏览 评分:9.9