题解列表

筛选

编写题解 1979: 求平均工资

摘要:解题思路:编辑数组先求和再求平均值注意事项:参考代码:#include <stdio.h>int main(){ int n,i,j,b=0,c;  scanf("%d",&n); int a[n];……

计算1~N之间所有奇数之和

摘要:解题思路:从1到N判断每一个数如果为奇数,累加如果为偶数,跳过参考代码:#include"iostream" using namespace std; int ans = 0; bool che……

深度优先搜索 题解 1311: P1044 数字三角求最值

摘要:解题思路: 直接把所有路径全跑一遍,把每条路径的最终值与max进行比较,谁大谁是新max。                好好干深度优先、广度优先遍历,好几个题目都是!图的这两个遍历,递归、非递归都给……

用c++类求分段函数

摘要:#include<iostream>#include<math.h>#include <iomanip>using namespace std;class text{ private: double……