伪代码
代码如下
//回溯法 - 递归 - n皇后问题 - 所有解
//编译器:vs 2019
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <math.h>
int n = 0; //n皇后的n
int x[80] = {
0 }; //存放解空间
int cnt = 0; //解个数
bool
伪代码
代码如下
//回溯法 - 递归 - n皇后问题 - 所有解
//编译器:vs 2019
#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <math.h>
int n = 0; //n皇后的n
int x[80] = {
0 }; //存放解空间
int cnt = 0; //解个数
bool