题解列表

筛选

1670: 拆分位数

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n,a,b,c; cin>>n; c=n%10; b=n%10……

动态数组解决绝对值排序

摘要:解题思路:难点在于数组的长度需要人为输入,采用动态数组解决。注意事项:参考代码:#include<iostream>> #include<cmath> using namespace std; ……

3035题解 dfs深搜

摘要:解题思路:直接搜索注意事项:参考代码:#include<iostream> #include<cstring> #include<cmath> #include<algorithm> #inc……

计算质因子(C++代码)

摘要:解题思路:质因数要求既是质数又是因数。质数:i为除了1和本身不能整除的数。因数:n除以i没有余数,i就是n的余数。先写一个求质数的代码。如果n%i==0,i就不为质数,当i等于n时,进不去循环,也代表……

2177 走迷宫(DFS)易懂写法(c++)

摘要:解题思路:大家都用bfs,这里提供dfs解法,设置一个二维数组来记录走到每个点的最短距离,那d【n】【m】就是答案注意事项:参考代码:#include<iostream>#include<cstrin……

理财计划(c++)

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<iomanip>using namespace std;int main(){ double k=0,n=0,p=0……

淘淘的名单(C++)

摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string>using namespace std;int main(){ int n=0; string a[1……

2750: 字符菱形

摘要:解题思路:   直接输出注意事项:参考代码:                #include<iostream>using namespace std;int main(){    char c;  ……

回文串-字符串处理(C++)

摘要:参考代码:#include<cstdio>#include<cstring>const int maxn = 256;   //判断字符串str是否是“回文串”bool judge(char str[……