http://blog.csdn.net/ly21st http://ly21st.blog.chinaunix.net
发布时间:2011-10-02 18:08:06
算法1:N=4count=0a=[0,0,0,0,0,0,0,0]#count=0def backtrack(t): if t==N: global count #此语句不可少,否则下面对count进行修改时 &nbs.........【阅读全文】
发布时间:2011-10-02 16:39:55
#include <stdio.h>#define N 8int a[N];int count=0;int flag;void backtrack(int k);int main(){ backtrack(0); printf("解的个数为:%d",count); getchar(); return 0;}void backtrack(int t){ int.........【阅读全文】