文件名称:20050622235246_eq
- 所属分类:
- Windows编程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2008-10-13
- 文件大小:
- 50.8kb
- 下载次数:
- 0次
- 提 供 者:
- h***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
八皇后VC图形演示,算法思想:回溯法,先在第1行放上一个皇后,然后在第2行合适的位置放上一个皇后,依次类推,如果8行都放满了,说明找到了一个解,如果第好第i行的皇后后,第i+1行找不到合适的位置,这时就回到第i行,把第i行的皇后放到下一个位置,继续尝试下一行。如此反复,知道找到所有的解。注意,这种算法找的解可能有等价的,某些解可由别的解经过旋转棋盘得到。-visual demostration in vc of eight queens problem.
algorithm: backtracking.
First, put a queen on first line then find a suitable position on 2nd line for next queen, and so on. When all eight lines have queens, it means we have find a solution. If we put the i-th queen, but can find a suitable position on the (i+1)th line, then back to the ith line and move the queen on the ith line to next suitable position and move on to the next line. Repeat this until we have found all the solutions. Note:By this mean, some solutions maybe equivalent to others, some can be acquired by the rotation of other solutions.
algorithm: backtracking.
First, put a queen on first line then find a suitable position on 2nd line for next queen, and so on. When all eight lines have queens, it means we have find a solution. If we put the i-th queen, but can find a suitable position on the (i+1)th line, then back to the ith line and move the queen on the ith line to next suitable position and move on to the next line. Repeat this until we have found all the solutions. Note:By this mean, some solutions maybe equivalent to others, some can be acquired by the rotation of other solutions.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
压缩包 : 93711120050622235246_eq.rar 列表 VC\EightQueen.clw VC\ReadMe.txt VC\EightQueen.h VC\EightQueen.cpp VC\EightQueen.dsw VC\StdAfx.h VC\StdAfx.cpp VC\EightQueen.ncb VC\EightQueen.plg VC\EightQueen.dsp VC\Resource.h VC\QueenPanel.h VC\res\EightQueen.rc2 VC\res\EightQueen.ico VC\res VC\EightQueenDlg.h VC\EightQueenDlg.cpp VC\EightQueen.aps VC\EightQueen.rc VC\QueenPanel.cpp VC\EightQueen.opt VC