文件名称:Josep
介绍说明--下载内容均来自于网络,请自行研究使用
Josephus 排列问题定义如下:假设n 个竞赛者排成一个环形。给定一个正整数m,从某
个指定的第1 个人开始,沿环计数,每遇到第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 个数。-Josephus with the problem are defined as follows: Suppose n a player lined up a ring. Given a positive integer m, from a designated section 1 begins with individuals along the ring count, the first m individuals, when confronted by their let out, and the count continued. This process until all the listed date. Finally a column for the winners. Each person listed in the order of the definition of the integers 1,2, ..., n an order. This arrangement is called a (n, m) Josephus arranged. For example, (7,3) Josephus arranged for 3,6,2,7,5,1,4. For a given 1,2, ..., n in the k number, Josephus would like to know whether there is a positive integer m makes (n, m) Josephus with the final number of exactly k pre-designated number of this k.
个指定的第1 个人开始,沿环计数,每遇到第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 个数。-Josephus with the problem are defined as follows: Suppose n a player lined up a ring. Given a positive integer m, from a designated section 1 begins with individuals along the ring count, the first m individuals, when confronted by their let out, and the count continued. This process until all the listed date. Finally a column for the winners. Each person listed in the order of the definition of the integers 1,2, ..., n an order. This arrangement is called a (n, m) Josephus arranged. For example, (7,3) Josephus arranged for 3,6,2,7,5,1,4. For a given 1,2, ..., n in the k number, Josephus would like to know whether there is a positive integer m makes (n, m) Josephus with the final number of exactly k pre-designated number of this k.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
input.txt
Josep.cpp
Josep.cpp