八皇后问题c++解法

#include 
using namespace std;
//递归算法解决八皇后问题。总共有92种解法。
int c[20], n=8, cnt=0;
void print(){

    for(int i=0; i

这个解法本人挺喜欢的,打印出所有的排列组合

八皇后问题c++解法_第1张图片

你可能感兴趣的:(c++)