for和好多if的故事 摘要:#include<stdio.h> int main() { int budget,i,b1=0,b2=0,b3=0; //b1是每月300减去预算的钱,就是每月的结余 //b2…… 题解列表 2023年08月23日 0 点赞 5 评论 324 浏览 评分:9.9
1045简单易懂C++代码 摘要:解题思路:构建三个函数,重点书写deal函数(处理函数)注意事项:要注意十个数中恰好第一个数是最大值的情况参考代码:#include<cstdio> #include<algorithm> usi…… 题解列表 2023年08月24日 0 点赞 0 评论 306 浏览 评分:9.9
1009(C语言代码) 摘要:解题思路:注意事项:参考代码:#includeint main(){ int a,b; scanf("%d",&a); a=a%100000; b=a; int coun…… 题解列表 2023年08月24日 0 点赞 0 评论 240 浏览 评分:9.9
C语言求和训练 摘要:解题思路: 对每一步进行分解去解决,分为三个部分,每一步用 for 循环进行遍历注意事项: 第二个 for 循环中用 pow()函数,pow( i , 2 )其意为 i 的 2 次方 …… 题解列表 2023年08月24日 0 点赞 0 评论 248 浏览 评分:9.9
蓝桥杯2017年第八届真题-发现环(纯dfs,无并查集) 摘要:解题思路:注意题目说法,如果将1作为根节点,建立一个树,只有一条边沟通树的非父子结点,故而我们可以首先dfs建立树,同时记录父结点,同时再做一遍dfs,此时注意保存沟通非父子节点的边所对应的两个结点。…… 题解列表 2023年08月24日 0 点赞 0 评论 345 浏览 评分:9.9
2783:判断是否为两位数 摘要:参考代码:#include<stdio.h>int main(){ int a; scanf("%d",&a); if(a>=10&&a<=99) printf("1"); …… 题解列表 2023年08月27日 0 点赞 0 评论 737 浏览 评分:9.9
2794:求平均年龄 摘要:注意事项:最后命令结果为浮点数时,要将表达式中n*1.0转化为浮点类型参考代码:#include<stdio.h>int main(){ int n,i,age,sum=0; scanf(…… 题解列表 2023年08月27日 0 点赞 2 评论 1479 浏览 评分:9.9
[编程入门]自定义函数之数字后移(简单易懂,适合新手,因为我也是) 摘要:解题思路:1.读懂题目,题目要求很简单,说白了就是将一行整数切片为两份,然后把后面一份移到前面并打印输出2.根据题目要求,我们只需要定义一个存放整数的数组,然后根据题目所给的m值对其切片(切点在q=n…… 题解列表 2023年08月27日 0 点赞 0 评论 348 浏览 评分:9.9
排序(c++ sort) 摘要:参考代码:#include<iostream>#include <algorithm>using namespace std;int main(){ int n; whil…… 题解列表 2023年08月27日 0 点赞 0 评论 422 浏览 评分:9.9
蓝桥杯2017年第八届真题-合根植物(无向图强连通分量) 摘要:解题思路:对每个点,如果未访问进行深搜找强连通分量参考代码:#include<bits/stdc++.h> using namespace std; #define maxx 2000000 i…… 题解列表 2023年08月28日 0 点赞 0 评论 245 浏览 评分:9.9