题解列表

筛选

递推式(斐波那契)

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;const int N = 105;int a[N],f[N];int main(……

2030: 树的中序遍历(C语言)

摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include <stdlib.h> typedef struct node {     int data;      ……

2029: 获取树的规模(C语言)

摘要:解题思路:    见代码及注释。注意事项:参考代码:#include <stdio.h> #include <stdlib.h> // 树结点结构体 typedef struct node ……

自定义函数之数字分离

摘要:解题思路:输入一串字符,逐个输出注意事项:循环语句参考代码:#include<iostream>#include<string>using namespace std;int main(){    s……

题解 1010:利润计算

摘要:解题思路:使用条件运算符注意事项:参考代码:#include<stdio.h>int main(){    int num=0;    int profit=0;    scanf("%d",&num……

【C++较复杂版解法】两种方法

摘要:两种方法主函数代码相同,宏定义方法不同参考代码://第一种 #include <iostream> using namespace std; #define swap(a,b) {int m;m……