文件名称: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
1-10皇后问题.doc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.