Welcome![Sign In][Sign Up]
Location:
Downloads SourceCode Mathimatics-Numerical algorithms Data structs
Title: josephus Download
 Description: Problem Description: Josephus ordered a new problem definition is as follows: Suppose n individuals arranged in a ring, given a positive integer m, from the first one Begins with individuals along the ring count, when confronted with the first m individuals let their out of line, then automatically add a calculator m, and the count continued into the OK go on. This process continues until all of them out of the column until the last person out of the column as a winner. This set up the individual numbers n Respectively, 1 ~ n, each number is one from the race have begun to count, then the order of each person out of the column is defined as an integer 1 ~ n An array. This arrangement is called a (n, m) Josephus arranged. For example, (7,3) Josephus arranged as 3,7,6,2,4,1,5. For a given 1,2, ..., n in the k-number, Josephus would like to know whether there is a positive integer m makes the (n, m) Josephus arranged in exactly the number of pre-k this for a pre-specified k number
 Downloaders recently: [More information of uploader 253548404]
 To Search: josephus
File list (Check if you may need any files):
josephus.cpp
    

CodeBus www.codebus.net