文件名称:bahuanghou
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:221.08kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
编写程序对八皇后问题进行求解:在8行8列的棋盘上放置8个皇后,使任一个皇后都不能吃掉其他的7个皇后(注:皇后可吃掉与她处于同行或同列或同一对角线上的其他棋子),并将结果以某种方式显示出来。
例如,当求出下述的一个解时,可输出如下信息来表示该解(输出了表示摆放皇后的坐标位置以及“棋盘状态”— 棋盘中有皇后的位置放一个“Q”字符,其他位置为“+”字符)。
(1,1) (5,2) (8,3) (6,4) (3,5) (7,6) (2,7) (4,8)
Q + + + + + + +
+ + + + + + Q +
+ + + + Q + + +
+ + + + + + + Q
+ Q + + + + + +
+ + + Q + + + +
+ + + + + Q + +
+ + Q + + + + +
-Write programs to solve the eight Queens chess problem: in 8 rows and 8 columns of placing 8 Queens on the Board, made it impossible for either a Queen eating other 7 Queen (Note: Queen may eat with her peers or other pieces on the same column, or diagonal), and the results are displayed in a certain way.
For example, when you find out a solution of the following, you can output the following message to indicate that the solution (the output display coordinate position of the Queen and "Checkerboard"-Board position of the Queen in a "Q" characters, other locations for the "+" character).
(1,1) (5,2) (8,3) (6,4) (3,5) (7,6) (2,7) (4,8)
Q+++++++
++++++ Q+
++++ Q+++
+++++++ Q
+ Q++++++
+++ Q++++
+++++ Q++
++ Q+++++
例如,当求出下述的一个解时,可输出如下信息来表示该解(输出了表示摆放皇后的坐标位置以及“棋盘状态”— 棋盘中有皇后的位置放一个“Q”字符,其他位置为“+”字符)。
(1,1) (5,2) (8,3) (6,4) (3,5) (7,6) (2,7) (4,8)
Q + + + + + + +
+ + + + + + Q +
+ + + + Q + + +
+ + + + + + + Q
+ Q + + + + + +
+ + + Q + + + +
+ + + + + Q + +
+ + Q + + + + +
-Write programs to solve the eight Queens chess problem: in 8 rows and 8 columns of placing 8 Queens on the Board, made it impossible for either a Queen eating other 7 Queen (Note: Queen may eat with her peers or other pieces on the same column, or diagonal), and the results are displayed in a certain way.
For example, when you find out a solution of the following, you can output the following message to indicate that the solution (the output display coordinate position of the Queen and "Checkerboard"-Board position of the Queen in a "Q" characters, other locations for the "+" character).
(1,1) (5,2) (8,3) (6,4) (3,5) (7,6) (2,7) (4,8)
Q+++++++
++++++ Q+
++++ Q+++
+++++++ Q
+ Q++++++
+++ Q++++
+++++ Q++
++ Q+++++
(系统自动生成,下载前可以参看下载内容)
下载文件列表
bahuanghou/bahuanghou.cpp
bahuanghou/bahuanghou.dsp
bahuanghou/bahuanghou.dsw
bahuanghou/bahuanghou.ncb
bahuanghou/bahuanghou.opt
bahuanghou/bahuanghou.plg
bahuanghou/Debug/bahuanghou.exe
bahuanghou/Debug/bahuanghou.ilk
bahuanghou/Debug/bahuanghou.obj
bahuanghou/Debug/bahuanghou.pch
bahuanghou/Debug/bahuanghou.pdb
bahuanghou/Debug/vc60.idb
bahuanghou/Debug/vc60.pdb
bahuanghou/Desktop_.ini
bahuanghou/Debug
bahuanghou
bahuanghou/bahuanghou.dsp
bahuanghou/bahuanghou.dsw
bahuanghou/bahuanghou.ncb
bahuanghou/bahuanghou.opt
bahuanghou/bahuanghou.plg
bahuanghou/Debug/bahuanghou.exe
bahuanghou/Debug/bahuanghou.ilk
bahuanghou/Debug/bahuanghou.obj
bahuanghou/Debug/bahuanghou.pch
bahuanghou/Debug/bahuanghou.pdb
bahuanghou/Debug/vc60.idb
bahuanghou/Debug/vc60.pdb
bahuanghou/Desktop_.ini
bahuanghou/Debug
bahuanghou
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.