C++代码进行解题,思路可与C语言共享 摘要:解题思路:就是每行数组减一注意事项:行与列之间的差值我用了d与k表示参考代码:#include <iostream>using namespace std;int main(){ int N; wh…… 题解列表 2023年07月01日 0 点赞 0 评论 393 浏览 评分:0.0
题目 1431: 蓝桥杯2014年第五届真题-分糖果题解 摘要:1.解题思路第一步:看一下所有的数是不是相等,如果是,flag=1,否则,flag=0第二步:全体减半第三步:所有的数都加上左边的数,相当于把左边数的一半给了这个数第四步:判断奇偶,如果是奇数,则这个…… 题解列表 2023年07月01日 0 点赞 0 评论 429 浏览 评分:0.0
和为给定数--二分 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>using namespace std;int a[100001];int main(){ in…… 题解列表 2023年06月29日 0 点赞 0 评论 446 浏览 评分:0.0
汤少的随机数(C语言解法)先排序后去重 摘要:解题思路:注意事项:参考代码:#include <iostream>#include<string.h>using namespace std;int main(){int a[100],b,c,d;…… 题解列表 2023年06月28日 0 点赞 0 评论 348 浏览 评分:0.0
蛇行矩阵(简简单单) 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<algorithm>using namespace std;int main(){ int n; cin>>…… 题解列表 2023年06月28日 0 点赞 0 评论 471 浏览 评分:9.9
温度转换入门小白求法 摘要: ###### #根据题目我们可以知道要求为 ---- 将温度进行转换 温度转换公式为 c=5(F-32)/9,取位2小数。 这是题目要求 输入一个华氏温度,要求输出摄氏温度。且温度要取…… 题解列表 2023年06月28日 1 点赞 0 评论 1137 浏览 评分:7.3
明明的随机数(正规) 摘要:解题思路:把相等于0,然后在排,在定义个数组,把不等于0的复制其中,然后输出.......注意事项:无参考代码:#include<iostream>#include<algorithm>using n…… 题解列表 2023年06月28日 0 点赞 0 评论 364 浏览 评分:9.9
逐步比较法求得三个数中最大值 摘要:解题思路:一共存在三个数,若要求得最大值,可以先比C和B,然后将C与B中较大的值去与A比较。就可以得出最大的一个数啦!max(b,c)就是B和C中较大的数max(a,max(b,c))就是A和B与C中…… 题解列表 2023年06月28日 0 点赞 0 评论 468 浏览 评分:9.9
去掉双斜杠注释(时间复杂度大点) 摘要:解题思路:注意事项:if(s[j][0]=='/'&&s[j][1]=='/') continue;这个要注意啊,开头双斜杠不换行,要不是提交就是错。参考代码:#i…… 题解列表 2023年06月28日 0 点赞 0 评论 437 浏览 评分:9.9
数列排序(超时了,啊!!!) 摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int main(){ int n; cin>>n;int a[n][9], b…… 题解列表 2023年06月28日 0 点赞 0 评论 525 浏览 评分:9.9