登录
首页 » 算法 » 回溯法解N后的C++源码(Visual Stdio2010环境测试通过)

回溯法解N后的C++源码(Visual Stdio2010环境测试通过)

于 2022-02-06 发布 文件大小:55.93 kB
0 231
下载积分: 2 下载次数: 1

代码说明:

#include #include #include #include using namespace std;class Queen{ friend int nQueen(int);private: bool Place(int k); void Backtrack(int t); void Output(); int n,//皇后个数  *x;//当前解 long sum;//当前已找到的可行性方案数};bool Queen::Place(int k){ for (int j=1;jn) {  sum++;  Output(); } else {  for (int i=1;i

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

发表评论

0 个回复

  • 智能家居程序
    基于STM32单片机的智能家居控制系统,本作品有单片机控制模块、GSM模块、继电器控制家电开关模块、传感器模块等,嵌入了uc/os II实时操作系统,使得系统运行更加稳定、高效和可靠,体现了当今“绿色环保”的理念,“人性化”的设计更给用户一个舒适的感觉。
    2022-08-23 20:25:29下载
    积分:1
  • C++ 链表类
    自己写的链表类,用C++封装, 有部分功能没有测试。模板编程。
    2022-10-30 06:10:02下载
    积分:1
  • 只是试试,简单版贪吃蛇
    只是试试,简单版贪吃蛇
    2022-07-13 00:11:15下载
    积分:1
  • MP3播放器: 利用API函数[mciSendString]可以轻松实现MP3音乐文件的播放。下面这段程序实现了MP3播放的大部分常规操作,对其稍加修改,做一个...
    MP3播放器: 利用API函数[mciSendString]可以轻松实现MP3音乐文件的播放。下面这段程序实现了MP3播放的大部分常规操作,对其稍加修改,做一个100KB大小的MP3播放器轻而易举 启动VB程序,在窗体上放置6个命令按钮,三个标签,一个公用对话框、一个进度条、一个状态栏和一个计时器,窗本的布置请参考附图 按钮"Open MP3 File"是用来打开对话框选择MP3文件,其他5个按钮分别为Play(播放)、Pause(暂停)、Stopplay(停止播放)、Back(向后跳跃)、Prew(向前跳跃)。Label1用来表示歌曲当前时间;label2放在时度条的最左边,Caption属性为"00:00";lable3放在时度条的右边,用来表示歌曲总长。-MP3 player : API function [mciSendString] can easily MP3 music player. Below this program of the MP3 player most of the conventional operation, its slightly modified, so the size of a 100KB MP3 player easily activated VB procedures, the forms to place orders six buttons, three label, a common dialog, a progress of a status bar and a 000 timer, the window layout of the buttons refer to the attached map. "MP3 File Open" is used to open the dialog box choose MP3 files, the other five buttons for Play (player), Pause (suspended), Stopplay (Cessation of players), Back (backwards jump), Prew (leap forward). Label1 songs said to the current time; Label2
    2023-08-08 11:10:03下载
    积分:1
  • 简单有限元计程序。 NJF
    简单有限元计算程序。 NJF---结点自由度数 E---弹性模量 NE---单元数 T---板厚度 VM---泊松比 z---实型二维数组,用来存放结点坐标 ZJ---实型二维数组,用来存放每个约束自由度方向和该方向的约束值, ie---实型二维数组,存放布尔矩阵 p---实型一维数组,先存放等效结点载荷,解完方程后存放输出的结点位移 a,b,a---实型数组,存放各个单元的面积及由结点坐标计算的bi,bj,ci,cj g---实型数组,存放单刚子块 zk---实型二维数组,存放整刚矩阵-Simple finite element program. NJF--- the number of nodes degree of freedom E--- elastic modulus NE--- units T--- plate thickness VM--- Poisson
    2023-02-27 12:45:04下载
    积分:1
  • N皇后问题
    回溯算法也叫试探法,它是一种系统地搜索问题的解的方法。回溯算法的基本思想是:从一条路往前走,能进则进,不能进则退回来,换一条路再试
    2022-02-20 18:10:01下载
    积分:1
  • 数学
    mathematic
    2022-08-02 17:18:18下载
    积分:1
  • 主要的
    列主消元法解线性方程组源程序-main-elimination method for solving linear equations source
    2023-04-05 16:55:03下载
    积分:1
  • 稀疏矩阵加的另类
    稀疏矩阵加法的另类算法-sparse matrix additive alternative algorithm
    2022-03-02 03:15:57下载
    积分:1
  • this to find out the shortest path for various nodes
    this to find out the shortest path for various nodes-this is to find out the shortest path for various nodes
    2022-02-03 14:28:49下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载