蓝桥杯算法提高VIP-和最大子序列 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main(){ int n,a[100000],ans=0,su…… 题解列表 2022年01月18日 0 点赞 0 评论 326 浏览 评分:0.0
编写题解 1042: [编程入门]电报加密 摘要:```c #include #include #include int main() { char a[100] = {'\0'}; int i,m; gets(a); m …… 题解列表 2022年01月18日 0 点赞 0 评论 439 浏览 评分:0.0
用辗转相除法来求最大公约数与最小公倍数【C语言】 摘要:# 用辗转相除法来求最大公约数与最小公倍数 代码如下: ```c #include int gcd(int m, int n) { int q; while (q = m % n) …… 题解列表 2022年01月18日 0 点赞 0 评论 520 浏览 评分:0.0
通过单链表删除,省的数组太大,导致循环多次.莫名其妙的char* 摘要:#include<stdio.h> #include<string.h> #include<malloc.h> typedef struct Node{ int c; s…… 题解列表 2022年01月19日 0 点赞 0 评论 283 浏览 评分:0.0
不向自定义数组的大小 摘要:#include<stdio.h> #include<string.h> #include<malloc.h> int main(){ int n,m; int status=s…… 题解列表 2022年01月19日 0 点赞 0 评论 282 浏览 评分:0.0
指针应用,注意虽然是冒泡,但是指针交换值与数组还是有差别 摘要:#include#include#includetypedef struct stu{ int sno; int grade; }STU,*stu; int main(){ int n…… 题解列表 2022年01月19日 0 点赞 0 评论 388 浏览 评分:0.0
1122: C语言训练-亲密数 摘要:解题思路:依次循环3000以内的数;先求A的全部因子之和,并赋值给B,再判断B的全部因子之和是否等于A,且需要判断B>A(实现小的在前);注意事项:需要判断B>A,以实现小的在前;参考代码:#incl…… 题解列表 2022年01月19日 0 点赞 0 评论 544 浏览 评分:0.0
1123: C语言训练-列出最简真分数序列* 摘要:解题思路:40的因子包括:1,2,4,5,8,10,20;其中的素数包括:2,5;只需循环判断:作为分子的数是否能被2或5整除即可;不能整除即输出该数;注意事项:无参考代码:#include<stdi…… 题解列表 2022年01月19日 0 点赞 0 评论 413 浏览 评分:0.0
随便写一下。。。 摘要:解题思路:就是简单的运用STL库里的set集合,再运用其自带的函数判断出现次数得知是否存在注意事项:每组数据测试完后注意清空集合?好像确实想不起来什么了参考代码:#include<iostream>#…… 题解列表 2022年01月19日 0 点赞 0 评论 433 浏览 评分:0.0
随便写一下。。。 摘要:解题思路:还是set的运用(有一说一,stl确实是好东西),不过set里没有重复的元素,所以用multiset,multiset内可以重复,然后把第一个元素删掉,再输出剩下元素的第一个元素就是倒数第二…… 题解列表 2022年01月19日 0 点赞 0 评论 453 浏览 评分:0.0