1011[编程入门]最大公约数与最小公倍数(C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdbool.h>int main(){ int m,n; scanf("%d %d",&m,&n); …… 题解列表 2023年08月25日 0 点赞 0 评论 168 浏览 评分:0.0
3154: 蓝桥杯2023年第十四届省赛真题-子串简写 摘要:解题思路: 在本子上手写模拟一下就出来了。以c2为结尾,记录当前有多少个c2,存在dp数组内 以c1为开头,循环寻找c1,从c1到结尾的c2个数存在dp[i]内,相减就是c2个数,再留出k…… 题解列表 2023年08月26日 0 点赞 0 评论 400 浏览 评分:0.0
矩阵交换行 摘要:解题思路:注意事项:记得要a[m-1] a[n-1]啊! 因为数组下标从0开始!!!参考代码:#include<stdio.h>#include<string.h>int main(){ int…… 题解列表 2023年08月26日 0 点赞 0 评论 152 浏览 评分:0.0
辗转相除法 摘要:解题思路:注意事项:参考代码#include<stdio.h>int main(){ int a,b,r,s=0,temp=0; scanf("%d%d",&a,&b); if(a<b) { tem…… 题解列表 2023年08月26日 0 点赞 0 评论 143 浏览 评分:0.0
1755: 姓名排序 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>using namespace std; //比较的规则int cmp(string a,st…… 题解列表 2023年08月27日 0 点赞 0 评论 170 浏览 评分:0.0
1151:计算一个整数的乘阶 摘要:参考代码:#include<stdio.h>int main(){ int n,i,sum; scanf("%d",&n); sum=1; for(i=n;i>=1;i--) …… 题解列表 2023年08月27日 0 点赞 0 评论 164 浏览 评分:0.0
1086: A+B for Input-Output Practice (II) 摘要:解题思路:注意事项:scanf输入注意事项: 对于两个scanf ,第一个scanf输入数字完要回车才能进入到下一个scanf的数字输入。 …… 题解列表 2023年08月27日 0 点赞 0 评论 213 浏览 评分:0.0
高精度加法 摘要:参考代码:#include <iostream> using namespace std; const int maxn = 1000; string x,y; int a[maxn],b…… 题解列表 2023年08月27日 0 点赞 0 评论 291 浏览 评分:0.0
去掉空格(处理多个空格相连) 摘要:解题思路: 用循环加gets分段收取输入,将空格后元素前移覆盖空格 注意事项: 注意考虑多个空格相连的情况 参考代码: ```c #include #include int main(…… 题解列表 2023年08月28日 0 点赞 0 评论 177 浏览 评分:0.0
蓝桥杯2017年第八届真题-分巧克力(贪心,二分) 摘要:解题思路:随着要求分的边长越来越大,可以分出的巧克力呈现非递增趋势,故而答案具有单调性,可以二分答案。对于每一个要求的边长,采用贪心的办法求得此边长可以分出的巧克力个数,对于每一个巧克力来说,顺次分可…… 题解列表 2023年08月28日 0 点赞 0 评论 288 浏览 评分:0.0