搜索资源列表
最大k乘积问题
- /*最大k乘积问题 问题描述: 设I是一个n位十进制整数。如果将I划分为k段,则可得到k个整数。这k个整数的乘积称为I的一个k乘积 。 试设计一个算法,对于给定的I和k,求出I的最大k乘积(n<=10)。 示例:输入为 : 4 3 结果:1234 */-/ k * Product of the biggest problems Descr iption : I set up is a n-bit decimal integer. If I will be divided into k, k
zerone
- 【题目描述】 Adam 和Eve 被赶出伊甸园后,盖起了四面高墙。高墙上写着n 行01 串。两人无事可做,于是 开始就这些01 串做如下博弈: 1. Adam 进行第1 手,此后双方轮流操作。 2. 第 i 手的操作者,可以且必须在0 和1 之间选择,并相应地抹掉某些串。具体地,若选择 0(1),则抹掉第i 位为0(1)的所有串。长度短于i 的串,也须抹掉。 3. 一方操作之后若将所有串都抹掉了,则判该方失败。 若两人皆明智,则胜负必然确定。不幸的是他俩
gray
- Gray码是一个长度为2n的序列。序列中无相同元素,每个元素都是长度为n位的串,相邻元素恰好只有1位不同。用分治策略设计并实现一个算法对任意的n构造响应的Gray码。-Gray code is a sequence of length 2n. No similar sequence elements, each element is n-bit string length, the adjacent element is only a difference exactly. With sub-r
viterbi3
- 对码率为1/n的递归卷积码(系统码!)的最大似然译码,采用相关度量,截断长度为1024,最大状态数为1024 -On the bit rate for the 1/n recursive convolutional codes (system code!) Of the maximum-likelihood decoding, using the relevant measure to cut off a length of 1024, the largest number of state
jj
- 问题描述: 给定n位正整数a,去掉其中任意k个数字后,剩下的数字按原次序排列成一个新的正整数。 算法设计: 给定n (1<=n<=200)位的正整数a和k,此时,k小于n。 试着设计一个算法,找出删去k个数,剩下数字组成的新数最小的删数方案。-Descr iption of the problem: given n-bit positive integer a, which removed the arbitrary k-figures, the rem
BitArray_src
- The Bit Array structure provides a compacted arrays of Booleans, with one bit for each Boolean value. A 0 [1] bit corresponds to the Boolean value false [true], respectively. We can look at a stream of bytes as a stream of bits each byte contains 8 b
WinnerTree
- 常见的实现方法是使用两个数组, t[n-1]和e[n],数组e存放所有的参加排序的元素,在完全二叉树中是叶子结点,t[]存放 的是比赛的阶段性胜者的编号,再进行n趟比赛排序结束,时间复杂度是O(n*log2(n)), 其实我觉得也可以只通过一个数组A[2*n-1]也可以实现,只是标号的换算有点复杂而已. -Common implementation approach is to use two array, t [n-1] and e [n], the array storage
zuiniudeNhuanghousuanfa
- 用位操作实现的求解N皇后问题,算法效率很高-Using bit operations to achieve the solution of N Queens problem, the algorithm very efficient
1
- 给定n 位正整数a,去掉其中任意k≤n 个数字后,剩下的数字按原次序排列组成一个新的正整数。对于给定的n位正整数a 和正整数k,设计一个算法找出剩下数字组成的新数最小的删数方案。对于给定的正整数a,编程计算删去k个数字后得到的最小数。-Given n-bit positive integer a, to remove any of them k ≤ n digits after the original order of the remaining figures to form a new
gl-ma
- Gray Code是一个数列集合,每个数使用二进位来表示,假设使用n位元来表示每个数好了,任两个数之间只有一个位元值不同-Gray Code a series of collections, each use binary numbers to represent, assuming the number of n bits to represent each well, and only between any two numbers a bit different from the valu
Nhuanghoug
- N皇后问题采用位算法来运算,速度很快,但是最多只适合32个皇后的运算-N queens problem by bit algorithm to compute, very fast, but only for a maximum of 32 Queen s operations
NQueen
- N皇后问题的快速实现 主要使用的位操作得以提速-N-Queens problem quickly realize the main use of bit operations to speed
NQueen_bit
- N皇后问题的一种简单解法,利用位运算来解决,当N较大时,能有效算出解法的种数。-N-Queens problem is a simple solution, the use of bit operations to solve, when N is large, it can effectively calculate the solution of the species.
PRIME-TEST
- 素数测试问题, 如果把乘、除法(包括取模)看成常数时间, 则算法的时间复杂度为 (k)= (log m)=O(log n)。 而当n极大时,与n在同一数量级的两个数相乘除, 不超过O(log2n)次二进制位操作。 ∴算法的时间复杂性为O(log3n)二进制位操作 -Prime test, If the multiplication, division ( including the modulus as a constant
multiMat
- 简单的实现了两个N阶矩阵的相乘,没有用任何算法,可能时间和空间复杂度有点高。-Simple multiplication of two N-order matrix without using any algorithm, and time and space complexity may be a bit high.
NQ
- N皇后问题(位运算,C语言版) N皇后问题求解 位运算-N-Queens problem (bit computing, C-language version) N-Queens problem solving-bit computing
Nqueen
- 给出了用三种方法实现的N皇后,包括循环、递归、位运算等,方便初学者进行研究学习。-Three ways to achieve the N-Queens, including loops, recursion, bit operation, easy for beginners to study learning.
nprime
- 给定一个整数N(2 <= N <= 8),生成所有的具有下列特性的特殊的N位质数:其前任意位都是质数。-Given an integer N (2 < = N < = 8), to generate all of the following characteristics of the particular N-bit prime number: it before any bits are prime numbers.
PA4C
- 在1<=n<=10000000个32位整数中选出最小的k个,输出依次为从大到小的最小的k个数字。计算时间2s内,内存使用小于12M。-In the 1 < = n < = 10000000 32-bit integers in a selected minimum k, the output in descending order of the minimum k digits. Calculating time 2s, memory usage is less than 1
穷举n位二进制数
- 输入一个小于20的正整数n,要求按从小到大的顺序输出所有的n位二进制数,每个数占一行。(Enter a positive integer that is less than 20, and you want to output all of the n-bit binary Numbers in the order of small to large, each of which is a row.)
