登录
首页 » Windows开发 » 八皇后VC图形演示,算法思想:回溯法,先在第1行放上一个皇后,然后在第2行合适的位置放上一个皇后,依次类推,如果8行都放满了,说明找到了一个解,如果第好第i行的...

八皇后VC图形演示,算法思想:回溯法,先在第1行放上一个皇后,然后在第2行合适的位置放上一个皇后,依次类推,如果8行都放满了,说明找到了一个解,如果第好第i行的...

于 2022-03-23 发布 文件大小:50.81 kB
0 229
下载积分: 2 下载次数: 1

代码说明:

八皇后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.

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • SDI中的ListView应用示例
    SDI中的ListView应用示例-the ListView SDI Application Example
    2022-05-15 04:06:05下载
    积分:1
  • This is a realization of backbag problem with VC++
    这是计算机算法中的背包问题的实现程序,使用VC开发!-This is a realization of backbag problem with VC++
    2022-01-27 10:18:11下载
    积分:1
  • Devil language program, English letters can be easily translated, but also can b...
    魔王语言程序,英文字母可以随便翻译,还可以翻译成一些已定义的中文。-Devil language program, English letters can be easily translated, but also can be translated into the Chinese that have been defined.
    2022-11-02 00:50:03下载
    积分:1
  • 基与MFC的拼图游戏源码 实现功能,可自定义图块大小,个数与源图片,拼自己喜欢的图片,记时,记分 ChildView.h ImageBlock.h...
    基与MFC的拼图游戏源码 实现功能,可自定义图块大小,个数与源图片,拼自己喜欢的图片,记时,记分 ChildView.h ImageBlock.h 。 。 。 PatchManager.cpp PatchBoard.cpp Settingdlg.c-The base of the jigsaw puzzle with the MFC source code to achieve functionality, can be customized tiles size, the number of source images, to fight their favorite pictures, remember, the score
    2022-01-26 18:32:50下载
    积分:1
  • 简捷有效的小键盘指法练习软件,现提供软件和源码下载。 小键盘数字键练习工具,程序小巧实用。每次随机产生10~25个数字,只能接受小键盘的数字键输入。输入完...
    简捷有效的小键盘指法练习软件,现提供软件和源码下载。 小键盘数字键练习工具,程序小巧实用。每次随机产生10~25个数字,只能接受小键盘的数字键输入。输入完成后按回车即产生新的一组数字。程序带有计时,计速度的功能,可以作为你练习小键盘数字键的辅助工具。 打开程序后,直接敲击回车就可以开始计时了,请使用小键盘来输入数字!软件只能接受小键盘的数字按键和回车键,其他按键不响应。-Simple and effective exercises small keyboard fingering software, now offers software and source code download. Keypad number keys practice tools, procedures and practical compact. Randomly generated for each 10 ~ 25 figures, accepted only a small number keys keyboard input. Input that is, press enter after the completion of a new one set of figures. Procedures with time, including the speed function, can be used as you practice the number keys of keypad aids. Open process, a direct hit Enter to start the timer, use the small keyboard to enter a number! Software can only accept a small number of keyboard keys and the enter key, other keys do not respond.
    2022-07-03 18:39:19下载
    积分:1
  • Marvell 88E8053 refernce manual
    Marvell 88E8053 refernce manual
    2022-05-13 22:45:03下载
    积分:1
  • 这是一个用开发的的多线程类只要加入工程可以非常方便的使用...
    这是一个用开发的的多线程类只要加入工程可以非常方便的使用-This is a development of the use of multithreading to the project as long as the class is very convenient to use
    2022-03-31 07:36:11下载
    积分:1
  • 阻尼振动 耦合振子 关于阻尼振动和耦合振子的一些小程序
    阻尼振动 耦合振子 关于阻尼振动和耦合振子的一些小程序-vibration damping coupled oscillator on the vibration damping and coupling oscillator some small programs
    2022-07-16 00:00:23下载
    积分:1
  • 延迟容忍网络中的条件最短路径路由
    延迟容忍网络的特点是
    2022-04-11 02:05:42下载
    积分:1
  • 这是一个演示使用VB对USB
    这是一个演示使用VB对USB-HID设备进行数据读取写入的通讯示例。可以遍历所有USB设备,由于没有类似调试设备,这个源代码没有测试,但里面的一些API函数可以让大家喜欢研究USB通讯开发的网友提供些帮助,这个代码转载与另外一个网站,如果作者看到有更完善的源代码可以发来更新下,感谢作者。-This is a demonstration using VB on the USB-HID device to read data written communication example. You can traverse all the USB devices, because no such test equipment, the source code is not tested, but inside some of the API functions will allow everyone likes USB communication development User research provide some help, this code is reproduced with another Web site to see if the author have a more complete source code can be made to update the next, thanks author.
    2023-06-17 17:45:04下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载