搜索资源列表
Algorithm
- c++经典小程序。包括河内塔 费式数列 巴斯卡三角形 三色棋 老鼠走迷官(一) 老鼠走迷官(二) 骑士走棋盘 八个皇后 八枚银币 生命游戏 字串核对 双色、三色河内塔 背包问题(Knapsack Problem) 数、运算 蒙地卡罗法求 PI Eratosthenes筛选求质数 超长整数运算(大数运算) 长 PI 最大公因数、最小公倍数、因式分解 完美数 阿姆斯壮数 最大
queen
- 拉斯维加斯(Las Vegas)算法来解皇后控制问题的解题报告和源代码。问题描述:在一个n×n个方格组成的棋盘上的任一方格中放置一个皇后,该皇后可以控制他所在的行,列以及对角线上的所有方格。对于给定的自然数n,在n×n个方格组成的棋盘上最少要放置多少个皇后才能控制棋盘上的所有方格,且放置的皇后互不攻击? 设计一个拉斯维加斯算法, 对于给定的自然数n (1≤n≤100)计算在n×n个方格组成的棋盘上最少要放置多少个皇后才能控制棋盘上的所有方格,且放置的皇后互不攻击。 -Las Vegas
Queens
- 程序功能:1.由n2个方块排成n行n列的正方形称为n元棋盘。 如果两个皇后位于n元棋盘上的同一行、同一列或同一对角线上,则称它们在互相攻击。 现要找出使棋盘上n个皇后互不攻击的布局。 2.编制程序解决上述问题, 用户输入0~30间的棋盘方阵,给出所有解决方案,并输出结果。 -queens of different table sizes
1945_N_Queens_Question
- 在NXN格的国际象棋棋盘上摆放N个皇后,使其不能互相攻击,即任意两个皇后都不能处于同一行、同一列或同一斜线上,问有多少种摆法。 第一行为一个整数T,表示有T组数据。 以下T行,每行有一个整数n(0<n<=11),如上所述。 对于每组数据输出一行,即问题的答案。 -In NXN chess board grid placing N queens on, it can not attack each other, that any two of the Queen can
n_Queen
- 该算法为回溯法的经典问题之一,在n*n的棋盘上放置n个皇后。运行后会给出皇后的位置和解的个数-The backtracking algorithm is one of the classic problems in the n* n place n queens on the chessboard. After running the settlement will give the location of the number of Queen s
C-Program-examples
- 河内塔 费式数列 巴斯卡三角形 三色棋 老鼠走迷官(一) 老鼠走迷官(二) 骑士走棋盘 八个皇后 八枚银币 生命游戏 字串核对 双色、三色河内塔 背包问题(Knapsack Problem) 数、运算 蒙地卡罗法求 PI Eratosthenes筛选求质数 超长整数运算(大数运算) 长 PI 最大公因数、最小公倍数、因式分解 完美数 阿姆斯壮数 最大访客数 中序式转
eightqueens
- 通过遍历所有可能打印出八皇后问题的所有解的情况,通过改变n的值可以得到广义八皇后问题的解-By traversing all possible print out of all the eight queens problem solution by changing the value of n can be generalized eight queens problem solution
The-queen
- 实现N个皇后问题,输出所有的排列情况,利用TXT实现输入输出-Realization of N-queens problem, the output of all of the arrangement, the use of input and output TXT achieve
nqueen
- 在n×n格的棋盘上放置彼此不受攻击的n个皇后。按照国际象棋的规则,皇后可以攻击与之处在同一行或同一列或同一斜线上的棋子。n后问题等价于在n×n格的棋盘上放置n个皇后,任何2 个皇后不放在同一行或同一列或同一斜线上。解n后问题的一个拉斯维加斯算法如下。-this is a project
the-problem-of-8-queens
- 数据结构实现八(n)皇后问题,c源码+自定义头文件。有注释-the problem of 8 queens,language:C,has comments.
exp5-1
- 求解皇后问题:在n*n的方格棋盘上,放置n个皇后,要求每个皇后不同行、不同列、不同左右对角线。-Queens Problem Solving: n* n on the checkerboard, place n queens, queens different requirements of each row, different columns and different about the diagonal.
include
- 1)编程实现n皇后算法,要求求出8皇后问题的所有解。 2)编程实现0-1背包问题的最优解。测试数据采用贪心算法一章的实验数据。 3)用图形输出中间过程。 4)在程序中添加统计扩展节点数,估计算法的复杂性。 -1) programming to achieve the queen n algorithm, the problem of all solutions to the 8 queens. 2) programming to realize the optimal sol
Queen
- 皇后问题,自定义输入N,完成N*N棋盘的N皇后排列问题。-Queens, custom input N, N Queen permutation problem N* N chessboard.