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
扩频通信M序列,编码,通用VHDL语言
上传时间: 2015-09-20
上传用户:zhouli
Problem Statement You are given a string input. You are to find the longest substring of input such that the reversal of the substring is also a substring of input. In case of a tie, return the string that occurs earliest in input. Definition Class: ReverseSubstring Method: findReversed Parameters: string Returns: string Method signature: string findReversed(string input) (be sure your method is public) Notes The substring and its reversal may overlap partially or completely. The entire original string is itself a valid substring (see example 4). Constraints input will contain between 1 and 50 characters, inclusive. Each character of input will be an uppercase letter ( A - Z ). Examples 0) "XBCDEFYWFEDCBZ" Returns: "BCDEF" We see that the reverse of BCDEF is FEDCB, which appears later in the string. 1)
上传时间: 2015-09-21
上传用户:sunjet
tr1 byte "Please input the first 64-bit in hex:first - second",0dh,0ah,0 string byte "remener :use enter to tell high 32-bit from low 32-bit",0dh,0ah,0 examp1 byte "eg: 1234ecdf",0dh,0ah,0 examp2 byte " 03ab2543",0dh,0ah,0
上传时间: 2014-08-22
上传用户:huyiming139
data array sdword 2 dup(?) str1 byte "Please input one 32-bit sign number :",0dh,0ah,0 str2 byte "The result is : ",0 align 4 jia1gao sdword 0 jia1 sdword 0 .code main proc call clrscr mov esi,offset array mov ecx,lengthof array mov edx,offset str1 push esi putin: call writestring
标签: Please sdword number array
上传时间: 2014-01-13
上传用户:xiaoyunyun
机器学习中的E M算法,本代码是基于高斯混合模型的E M 算法聚类。
上传时间: 2013-12-24
上传用户:jcljkh
This software designs the student result management system m ay replace the tedious low effect the manual management, has realized the result management, the information management and the curriculum manages three big cores functions.
标签: the management software designs
上传时间: 2013-12-15
上传用户:kr770906
This software designs the document management system may replace the tedious low effect the manual management, has used the c language programming, realized the document input to loan, the information management and the data compilation three big cores function
标签: the management software document
上传时间: 2013-12-20
上传用户:yt1993410
模拟杨氏双缝干涉实验的M程序,用MATLAB进行仿真,可以很好的达到效果
上传时间: 2015-09-23
上传用户:hxy200501
对于一个动态系统dy/dt=-y(t)+x(t-m),m为一个时间滞后常量,x(t)、y(t)都是关于时间 t的函数,其中x是一个正态分布的数据集合,可随机产生,这样情况下,如何将系统情况 用样本点表示出来
上传时间: 2015-09-23
上传用户:15071087253