Josephus排列问题定义如下:假设n个竞赛者排成一个环形。给定一个正整数m,从某个指定的第一个人开始,沿环计数,每遇到第m个人就让其出列,且计数继续进行下去。这个过程一直到所有的人都出列为止。最后出列都优胜者。每个人出列的次序定义了整数1,2,...,n的一个排列。这个排列称为一个(n,m)Josephus排列。例如,(7,3)Josephus排列为3,6,2,7,5,1,4.对于给定的1,2,...n中的k个数,Josephus想知道是否存在一个正整数m(n,m)Josephus排列的最后k个数为事先指定的这k个数。
上传时间: 2015-09-20
上传用户:zycidjl
I holp somebody will need it.
上传时间: 2014-01-08
上传用户:xhz1993
game engine, which is useful for everyone who is interested in it. I hope you can enjoy it.
标签: interested everyone engine useful
上传时间: 2013-11-25
上传用户:水口鸿胜电器
fbkldfmlb n/ovk,e vml bhdsrb mor brb n/sZPer b vk,epabho,l rnopazbhlrepofrt,epsho
标签: rnopazbhlrepofrt fbkldfmlb bhdsrb epabho
上传时间: 2014-01-25
上传用户:ANRAN
C++递归实现n个字符的子集,其中也有字符
上传时间: 2013-12-26
上传用户:AbuGe
任意输入一个整数n,程序将自动生成1到n之间n个数的全部可能排列。利用递归算法。
上传时间: 2015-09-23
上传用户:王楚楚
时间复杂度为O(nlogn)的Joseph排列问题的计算程序。程序的运行时间与m无关。在一分钟之内可以计算n=10^6,m任意的Joseph排列问题.
上传时间: 2013-12-21
上传用户:zhanditian
时间复杂度为O(nlogn)的最长单调递增子序列问题的计算程序。不是动态规划算法。在一分钟之内可以计算n=10^6个元素的递增子序列。
上传时间: 2014-03-10
上传用户:1966640071
寻找数组中a[i]=i分治算法,主要采用类似的二分法的算法
上传时间: 2013-12-19
上传用户:ayfeixiao
I believe that technology has the capacity to fundamentally improve people’s lives, and improve the world in which we live.We are now two years into what my company have called the ‘Digital Decade’.We think that by 2010 a combination of hardware and software innovation with broader social trends will change the way computing fits into our society. Mobile technology is a central part of this vision.
标签: improve fundamentally technology the
上传时间: 2014-01-19
上传用户:kristycreasy