文件名称:vc62445261344
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:52kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
摘 要
本设计的内容是在一个八行八列的国际棋盘上,放置八个皇后,要求在任意一行,任意一列及任意一条对角线上都不能出现两个棋子。
本设计所涉及到的程序设计语言是VC++,采用的是递归和回溯的方法。首先在棋盘上找到一个位置,放置其中的一个皇后,然后对该皇后进行检查,查看她是否与棋盘同一行、同一列或同一斜线上已存在的皇后发生冲突。如果该皇后与棋盘上已经存在的皇后不发生冲突,则该皇后就摆放在此位置,继续试探下一个皇后的合适的位置;如果该皇后与棋盘上已经存在的皇后反生冲突,则该皇后就不能放在此位置,继续试探此皇后的下一个位置。直到将八个皇后都放到棋盘上,则问题解决。通过以上的方法对本课设题目进行设计与调试最后成功的输出了八皇后所有的92中合理布局,完成了设计题目的要求。
关 键 词:递归算法,八皇后,回溯法,VC++
-Abstract
The design of the content is in a line of eight international board, placed on any requirement, eight queen, any column and any diagonals cannot appear on two pieces.
This design involves the programming language is used, vc++ is recursive and back. First find a position on board, and placed in one of the queen, then the queen to inspect, check whether she and board with the same column or the same line, the queen of the existing cross-court conflict. If the queen and board existing queen not conflict, the queen will put in this position, continue to test a queen s place, If the queen on board with the queen the already existing conflict, the queen was born in this position, can continue to test the queen s next position. Until eight queen on board, problem solving. Through the above method for this class set subject designing and debugging of the output of the 92 8queens all reasonable layout, completed the design set the topic request.
Keywords: Recursive algorithm,Eight
本设计的内容是在一个八行八列的国际棋盘上,放置八个皇后,要求在任意一行,任意一列及任意一条对角线上都不能出现两个棋子。
本设计所涉及到的程序设计语言是VC++,采用的是递归和回溯的方法。首先在棋盘上找到一个位置,放置其中的一个皇后,然后对该皇后进行检查,查看她是否与棋盘同一行、同一列或同一斜线上已存在的皇后发生冲突。如果该皇后与棋盘上已经存在的皇后不发生冲突,则该皇后就摆放在此位置,继续试探下一个皇后的合适的位置;如果该皇后与棋盘上已经存在的皇后反生冲突,则该皇后就不能放在此位置,继续试探此皇后的下一个位置。直到将八个皇后都放到棋盘上,则问题解决。通过以上的方法对本课设题目进行设计与调试最后成功的输出了八皇后所有的92中合理布局,完成了设计题目的要求。
关 键 词:递归算法,八皇后,回溯法,VC++
-Abstract
The design of the content is in a line of eight international board, placed on any requirement, eight queen, any column and any diagonals cannot appear on two pieces.
This design involves the programming language is used, vc++ is recursive and back. First find a position on board, and placed in one of the queen, then the queen to inspect, check whether she and board with the same column or the same line, the queen of the existing cross-court conflict. If the queen and board existing queen not conflict, the queen will put in this position, continue to test a queen s place, If the queen on board with the queen the already existing conflict, the queen was born in this position, can continue to test the queen s next position. Until eight queen on board, problem solving. Through the above method for this class set subject designing and debugging of the output of the 92 8queens all reasonable layout, completed the design set the topic request.
Keywords: Recursive algorithm,Eight
(系统自动生成,下载前可以参看下载内容)
下载文件列表
vc62445261344/res/EightQueen.rc2
vc62445261344/res/EightQueen.ico
vc62445261344/res
vc62445261344/EightQueen.aps
vc62445261344/EightQueen.clw
vc62445261344/EightQueen.cpp
vc62445261344/EightQueen.dsp
vc62445261344/EightQueen.dsw
vc62445261344/EightQueen.h
vc62445261344/EightQueen.ncb
vc62445261344/EightQueen.opt
vc62445261344/EightQueen.plg
vc62445261344/EightQueen.rc
vc62445261344/EightQueenDlg.cpp
vc62445261344/EightQueenDlg.h
vc62445261344/QueenPanel.cpp
vc62445261344/QueenPanel.h
vc62445261344/ReadMe.txt
vc62445261344/Resource.h
vc62445261344/StdAfx.cpp
vc62445261344/StdAfx.h
vc62445261344/相关说明.txt
vc62445261344
vc62445261344/下载说明.html
vc62445261344/fwvv.net说明.txt
vc62445261344/res/EightQueen.ico
vc62445261344/res
vc62445261344/EightQueen.aps
vc62445261344/EightQueen.clw
vc62445261344/EightQueen.cpp
vc62445261344/EightQueen.dsp
vc62445261344/EightQueen.dsw
vc62445261344/EightQueen.h
vc62445261344/EightQueen.ncb
vc62445261344/EightQueen.opt
vc62445261344/EightQueen.plg
vc62445261344/EightQueen.rc
vc62445261344/EightQueenDlg.cpp
vc62445261344/EightQueenDlg.h
vc62445261344/QueenPanel.cpp
vc62445261344/QueenPanel.h
vc62445261344/ReadMe.txt
vc62445261344/Resource.h
vc62445261344/StdAfx.cpp
vc62445261344/StdAfx.h
vc62445261344/相关说明.txt
vc62445261344
vc62445261344/下载说明.html
vc62445261344/fwvv.net说明.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.