文件名称:queen
介绍说明--下载内容均来自于网络,请自行研究使用
这道题的算法思路比较简单,其重点在于对搜索的剪枝优化,由于如果对于每一行都枚举每一列,显然其中会有很多在枚举过程中就可以判断不可能出解的情况,显然对这些情况的继续向下一行搜索是无用的冗余操作,所以我们应在枚举搜索中加入一些判断条件,以减少无用的搜索分支。
-Algorithm of solving the problem is relatively simple idea, with its emphasis on the search pruning technique, because if For each row enumeration each column, apparently there will be a lot can be judged in the enumeration process can not be a solution of the case, the Obviously these situations continue down one line search is useless redundant operations, so we should join in the enumeration search some judgments conditions, in order to reduce the useless search branch.
-Algorithm of solving the problem is relatively simple idea, with its emphasis on the search pruning technique, because if For each row enumeration each column, apparently there will be a lot can be judged in the enumeration process can not be a solution of the case, the Obviously these situations continue down one line search is useless redundant operations, so we should join in the enumeration search some judgments conditions, in order to reduce the useless search branch.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
皇后问题.cpp
1-10皇后问题.doc