摘要:
1.code.cpp:1:21: fatal error: iostream : No such file or directory #include ^compilation terminated.这个情况可能是在代码中写成这样 #include就是在头文... 阅读全文
摘要:
题意:从 节点1出发,一笔画出 圣诞老人的家(所谓一笔画,就是遍访所有边且每条边仅访问一次)。思路:深度优先搜索(DFS算法)#include#include#includeusing namespace std;int map[6][6];void makemap(){ memset(map... 阅读全文
摘要:
思路:宽度优先搜索(BFS算法) #include#include#include#includeusing namespace std;int a,b;struct node{ int num; int step;};node que[10000];//默认初始化为0int visit[10000... 阅读全文
摘要:
使用时注意类型,可见两者皆不可以用int1.pow函数声明: double pow (double base , double exponent); float pow (float base , float exponent);long double pow (... 阅读全文
摘要:
#includeusing namespace std;int a[5];//默认初始化为0int main(){ int b[5];//随机值 int c[5]={3};// c[0]=3,其他初始化0 return 0;} 阅读全文