八皇后问题 递归求解法

#include <iostream>
#include <fstream>
#include <string.h>/**
八皇后问题递归方法实现
*/
using namespace std;ofstream file;//用以计数计算结果的数目
int count = 1;
/**
打印的棋盘其中打印1的位置是皇后的位置,0空位。
这里因为在控制台看不到全部,所有做了在文件中输出所有的解
*/
int print_Chessboard(int chessboard[][8])
{file.open("data.txt",ofstream::app|ofstream::out);file<<"答案:"<<count<<endl;cout<<"答案:"<<count<<endl;count++;for(int row = 0; row < 8;row++){for(int column = 0;column<8;column++){file<<chessboard[row][column]<<" ";cout<<chessboard[row][column]<<" ";}file<<endl;cout<<endl;}file<<endl<<endl;cout<<endl<<endl;file.close();
}
/**
参数一将棋盘信息传入函数,
参数二将要放入的皇后的行数传入
参数三将要放入的皇后的列数传入
若皇后放入成功则返回1,若失败则返回0
*/
int check_Chessboard(int chessboard[][8],int row,int column)
{//1、首先检查行数和列数是否已经超出棋盘的局限,若超出了//说明前边已经都符合位置,此时返回成功系数1if(row>=8){//打印结果
        print_Chessboard(chessboard);return 1;}//2、检查在这一列上是否有皇后,正上方for(int i = 0; i < row;i++){if(chessboard[i][column]==1)return 0;}//3、检查在左上和右上斜对角上是否有皇后//左上45度for(int i=row-1,j=column-1;i>=0&&j>=0;i--,j--){if(chessboard[i][j]==1)return 0;}//右上45度for(int i=row-1,j=column+1;i>=0&&j<8;i--,j++){if(chessboard[i][j]==1)return 0;}//到这里说明摆放成功//摆放成功后把这个位置标记为1chessboard[row][column]=1;//循环的检查下一行的没一个位置for(int i = 0; i < 8; i++){if(check_Chessboard(chessboard,row+1,i)==0)continue;else break;}//若没有摆放成功就返回0;此时需要把该位置重新置为0chessboard[row][column]=0;return 0;
}
//主调函数
int main()
{int chessboard[8][8];for(int i = 0; i < 8; i++){memset(chessboard,0,sizeof(chessboard));check_Chessboard(chessboard,0,i);}return 0;
}

 

以下是运行结果,答案共有92中摆放方法

View Code
答案:1
1 0 0 0 0 0 0 0 
0 0 0 0 1 0 0 0 
0 0 0 0 0 0 0 1 
0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 0 0 0 0 0 0 
0 0 0 1 0 0 0 0 
1 0 0 0 0 0 0 0 
0 0 0 0 0 0 1 0 
0 0 0 0 1 0 0 0 
0 0 1 0 0 0 0 0 
0 0 0 0 0 1 0 0 答案:90
0 0 0 0 0 0 0 1 
0 1 0 0 0 0 0 0 
0 0 0 0 1 0 0 0 
0 0 1 0 0 0 0 0 
1 0 0 0 0 0 0 0 
0 0 0 0 0 0 1 0 
0 0 0 1 0 0 0 0 
0 0 0 0 0 1 0 0 答案:91
0 0 0 0 0 0 0 1 
0 0 1 0 0 0 0 0 
1 0 0 0 0 0 0 0 
0 0 0 0 0 1 0 0 
0 1 0 0 0 0 0 0 
0 0 0 0 1 0 0 0 
0 0 0 0 0 0 1 0 
0 0 0 1 0 0 0 0 答案:92
0 0 0 0 0 0 0 1 
0 0 0 1 0 0 0 0 
1 0 0 0 0 0 0 0 
0 0 1 0 0 0 0 0 
0 0 0 0 0 1 0 0 
0 1 0 0 0 0 0 0 
0 0 0 0 0 0 1 0 
0 0 0 0 1 0 0 0 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/548336.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

squid代理服务器在企业网中的应用

一&#xff0c;squid服务器概述 Squid是一种在Linux系统下使用的优秀的代理服务器软件。 squid不仅可用在Linux系统上&#xff0c;还可以用在AIX、Digital Unix、FreeBSD、HP-UX、Irix、NetBSD、Nextstep、SCO和Solaris等系统上。 Squid与Linux下其它的代理软件如Apache、Socks…

MPLS ×××配置

MPLS 配置以下面拓扑为例配置MPLS 拓扑说明&#xff1a;R1&#xff0c;R2、R3路由器上分别配置Loopback1 接口&#xff0c;IP地址分别为1.1.1.1&#xff0c;2.2.2.2 3.3.3.3&#xff1b;并配置OSPF&#xff0c;让MPLS区域内的地址可以进行标签交换1、在MPLS区域配置标签交换R1&…

oracle异常处理

2019独角兽企业重金招聘Python工程师标准>>> CREATE OR REPLACE PACKAGE BODY TEST_PACKAGE IS --异常分为&#xff1a;编译是错误(语法错误)、运行时错误(编译器无法检查&#xff0c;对应某些情况程序是可以正常执行的&#xff0c;但在某些特点情况下程序不会正确执…

IOS程序内发短信

2019独角兽企业重金招聘Python工程师标准>>> iOS4.0新加入了MFMessageComposeViewController和MFMessageComposeViewControllerDelegate,提供了发送短信的接口,可以像发送邮件那样不用跳出程序来发送短信. 介绍可参阅Message UIFramework Reference 一些笔记: MFMes…

JQUERY学习第二天之制作横纵向导航菜单

$(document).ready(function(){ //页面中的DOM已经装载完成时&#xff0c;执行的代码 $(".main > a").click(function(){ //找到主菜单项对应的子菜单项 var ulNode $(this).next("ul"); /* if (ulNode.css("display") "none"…

任何项目都适用的CMakeLists配置

声明下&#xff1a;本人想把CMakeLists中的内容写好,csdn格式化了&#xff0c;无能为力&#xff0c;以下是本人在生产环境中已经使用过了。 测试代码: #include int main() { //不支持linux //#ifndef _DEBUG #ifndef DEBUG std::cout << “release” << std::end…

深入 Apache Kylin Cube 与查询优化

2019独角兽企业重金招聘Python工程师标准>>> 近几年&#xff0c;Apache Kylin作为一个高速的开源分布式大数据查询引擎正在迅速崛起。它充分发挥Hadoop、Spark、HBase等技术的优势&#xff0c;通过对超大规模数据集进行预计算&#xff0c;实现秒级甚至亚秒级的查询响…

Centos搭建SVN服务器及配置文件

2019独角兽企业重金招聘Python工程师标准>>> 1、安装 #yum install subversion 判断是否安装成功 yum安装结束时会显示版本 svnserve, version 1.6.11 (r934486) 出现上面的提示&#xff0c;说明安装成功。 有了SVN软件后还需要建立SVN库。 #mkdir /opt/svn/repos …

IP地址查询接口及调用方法

为什么80%的码农都做不了架构师&#xff1f;>>> 设计蜂巢IP地址查询接口&#xff1a;http://www.hujuntao.com/api/ip/ip.php腾讯IP地址查询接口&#xff1a;http://fw.qq.com/ipaddress新浪IP地址查询接口&#xff1a;http://int.dpool.sina.com.cn/iplookup/iplo…

加解密技术(Cryptography)基本概念

转载自&#xff1a;http://www.cnblogs.com/piyeyong/archive/2010/06/10/1744692.html 要想实现在不安全的网络上的安全通信&#xff0c;需要考虑3个方面的问题&#xff1a;保密(Privacy)&#xff0c;认证(Authentication)&#xff0c;完整性(Integrity)。 1.保密(Privacy) 数…

.NET配置文件读写实例(附SosoftConfigHelper类)

配置文件在软件开发中起到举足轻重的作用&#xff0c;可以说不可或缺。.NET程序可使用.config文件作为配置文件&#xff0c;例如WinForm程序的*.app.config、Web程序的web.config。.config文件是标准的XML文件。本实例可读取、修改和添加app.confing或者web.config文件的appSet…

【引用】phpmyadmin提示Access denied for user 'root'@'localhost' (using password: NO)的解决办法...

一、错误内容 今天用phpmyadmin连接mysql里面的某个数据库时时遇到了下面的提示&#xff1a; #1045 - Access denied for user rootlocalhost (using password: NO) phpMyAdmin 试图连接到 MySQL 服务器&#xff0c;但服务器拒绝连接。您应该检查 config.inc.php 中的主机、用户…

H3C 帧中继初级配置(二)

配置思路&#xff1a; 1、先配置FR-SWITCH 2、再配置RTA、RTB、RTC FR-SWITCH详细配置步骤如下&#xff1a; [FR-Switch]fr switching //启动路由器帧中继功能 [FR-Switch]interface s6/0 [FR-Switch-Serial6/0]link-protocol fr //链路协议封闭为FR [FR-Switch-Serial6/0]fr…

Java并发同步器AQS(AbstractQueuedSynchronizer)学习笔记(2)

2019独角兽企业重金招聘Python工程师标准>>> 学习了AbstractQueuedSynchronizer 之后(Condition没有在上文做笔记&#xff0c;当应该不难理解)&#xff0c;接下来笔者就尝试着分析在JUC包中的各个同步器&#xff0c;其语义是如何实现的。 ReentrantLock 内部类Sync继…

Ural 1627 Join(生成树计数)

http://acm.timus.ru/problem.aspx?space1&num1627 生成树计数的题&#xff0c;直接用Matrix-Tree定理就可以解决问题了。 代码如下&#xff1a; View Code 1 #include <cstdio>2 #include <cstring>3 #include <algorithm>4 5 using namespace std;6 …

Navicat for MySQL工具创建mysql数据库定时器

步骤1&#xff1a; 步骤二&#xff1a; 效果图:

魔兽争霸3地图(WarIII Maps):三国猛兽传

魔兽争霸3地图&#xff08;WarIII Maps&#xff09;&#xff1a;三国猛兽传三国猛兽传三国时期&#xff0c;连年战乱&#xff0c;天降异象&#xff0c;所有战力无双的英雄&#xff0c;外表全都变成了凶悍的猛兽…………其貌虽毁&#xff0c;其心不改攻城略地&#xff0c;百战成…

Oracle SQL语句执行步骤

Oracle中SQL语句执行过程中,Oracle内部解析原理如下: 1、当一用户第一次提交一个SQL表达式时,Oracle会将这SQL进行Hard parse,这过程有点像程序编译,检查语法、表名、字段名等相关信息&#xff08;如下图&#xff09;&#xff0c;这过程会花比较长的时间&#xff0c;因为它要分…

Ubuntu 找不到libc.so.6

2019独角兽企业重金招聘Python工程师标准>>> 在Ubuntu 上&#xff0c;其实这个库是存在的&#xff0c;只是地方换了&#xff0c;在"/lib/i386-linux-gnu/"下面&#xff0c;我们只需创建一个链接即可。使用下面的命令&#xff1a; rootubuntuJack:/lib/i3…

matlab学习:人脸识别之LBP (Local Binary Pattern)

1.算法简介 LBP是一种简单&#xff0c;有效的纹理分类的特征提取算法。LBP算子是由Ojala等人于1996年提出的&#xff0c;主要的论文是"Multiresolution gray-scale and rotation invariant texture classification with local binary patterns", pami, vol 24, no.7,…