2017年3月9日

数学算式搜索问题

摘要: #include "iostream.h" #include "string.h" #include "math.h" float a[9]; bool repeat(int i) { for(int k=0;k<i;k++) if(a[k]==a[i]) return 1; return 0; } void dfs(int n) { ... 阅读全文

posted @ 2017-03-09 09:47 ewitt 阅读(134) 评论(0) 推荐(0)

n皇后问题

摘要: #include "iostream.h" #include "string.h" #include "math.h" const int col=4;//4 columns int r[col];//r[i]represents for the r[i]-th column of i-th row bool fit(int row) { for (int i=0;i<row ;i++... 阅读全文

posted @ 2017-03-09 09:29 ewitt 阅读(80) 评论(0) 推荐(0)

导航