VS2017 C++解决八皇后问题(源代码)

上传者: Iris_Wu12138 | 上传时间: 2022-06-14 16:47:35 | 文件大小: 13.41MB | 文件类型: ZIP
八皇后问题(难度系数:***) 八皇后问题是一个古老而著名的问题,它是回溯法的典型例题。该问题是德国著名数学家高斯于1850年提出的:在8行8列的国际象棋棋盘上摆放着八个皇后。若两个皇后位于同一行、同一列或同一对角线上,则称它们为互相攻击。在国际象棋中皇后是最强大的棋子,因为它的攻击范围最大。 本题目的要求是:在8×8的国际象棋棋盘上,放置8个皇后。要求使这八个皇后不能互相攻击,即每一横行、每一列、每一对角线上均只能放置一个皇后,求出所有可能的方案,输出这些方案,并统计方案总数。 【基本要求】: (1)依次输出各种成功的放置方法。         (2)最好能画出棋盘的图形形式,并在棋盘上动态地演示试探过程。        (3)程序能方便地移植到其它规格的棋盘上。 【知识点】:栈,队列,深度搜索,广度搜索,回溯,穷举,递归。

文件下载

资源详情

[{"title":"( 30 个子文件 13.41MB ) VS2017 C++解决八皇后问题(源代码)","children":[{"title":"八皇后","children":[{"title":".vs","children":[{"title":"八皇后","children":[{"title":"v15","children":[{"title":"Browse.VC.db <span style='color:#111;'> 35.43MB </span>","children":null,"spread":false},{"title":".suo <span style='color:#111;'> 35.50KB </span>","children":null,"spread":false},{"title":"ipch","children":[{"title":"c4c3c7e8484fa37c.ipch <span style='color:#111;'> 320.00KB </span>","children":null,"spread":false},{"title":"AutoPCH","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"八皇后","children":[{"title":"pch.h <span style='color:#111;'> 639B </span>","children":null,"spread":false},{"title":"Queen.h <span style='color:#111;'> 889B </span>","children":null,"spread":false},{"title":"八皇后.vcxproj.filters <span style='color:#111;'> 1.30KB </span>","children":null,"spread":false},{"title":"pch.cpp <span style='color:#111;'> 200B </span>","children":null,"spread":false},{"title":"Queen.cpp <span style='color:#111;'> 2.40KB </span>","children":null,"spread":false},{"title":"八皇后.vcxproj <span style='color:#111;'> 8.28KB </span>","children":null,"spread":false},{"title":"main.cpp <span style='color:#111;'> 1.02KB </span>","children":null,"spread":false},{"title":"八皇后.vcxproj.user <span style='color:#111;'> 165B </span>","children":null,"spread":false},{"title":"Debug","children":[{"title":"八皇后.log <span style='color:#111;'> 142B </span>","children":null,"spread":false},{"title":"八皇后.pch <span style='color:#111;'> 1.94MB </span>","children":null,"spread":false},{"title":"八皇后.obj <span style='color:#111;'> 71.84KB </span>","children":null,"spread":false},{"title":"pch.obj <span style='color:#111;'> 3.62KB </span>","children":null,"spread":false},{"title":"main.obj <span style='color:#111;'> 71.81KB </span>","children":null,"spread":false},{"title":"vc141.idb <span style='color:#111;'> 603.00KB </span>","children":null,"spread":false},{"title":"Queen.obj <span style='color:#111;'> 76.69KB </span>","children":null,"spread":false},{"title":"八皇后.tlog","children":[{"title":"八皇后.lastbuildstate <span style='color:#111;'> 209B </span>","children":null,"spread":false},{"title":"CL.write.1.tlog <span style='color:#111;'> 1.66KB </span>","children":null,"spread":false},{"title":"CL.read.1.tlog <span style='color:#111;'> 79.99KB </span>","children":null,"spread":false},{"title":"CL.command.1.tlog <span style='color:#111;'> 2.76KB </span>","children":null,"spread":false},{"title":"link.write.1.tlog <span style='color:#111;'> 498B </span>","children":null,"spread":false},{"title":"link.command.1.tlog <span style='color:#111;'> 1.23KB </span>","children":null,"spread":false},{"title":"link.read.1.tlog <span style='color:#111;'> 3.81KB </span>","children":null,"spread":false}],"spread":false},{"title":"vc141.pdb <span style='color:#111;'> 476.00KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"八皇后.sln <span style='color:#111;'> 1.41KB </span>","children":null,"spread":false},{"title":"Debug","children":[{"title":"八皇后.exe <span style='color:#111;'> 120.50KB </span>","children":null,"spread":false},{"title":"八皇后.pdb <span style='color:#111;'> 1.05MB </span>","children":null,"spread":false},{"title":"八皇后.ilk <span style='color:#111;'> 1.11MB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明