CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - josephus
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Sub Category
assembly language
SCSI-ASPI
ELanguage
Disk Tools
Speech/Voice recognition/combine
Editor
Anti-virus
MultiLanguage
MPI
source in ebook
Delphi VCL
OS Develop
MiddleWare
MacOS develop
LabView
e-language
python
Search - josephus - List
[
assembly language
]
xunhuanlianbiao-Josephus
DL : 0
用循环链表解Josephus问题。设有n个人围坐在一个圆桌周围,现从第1个人开始报数,数到第m的人出列,然后从出列的下一个人重新开始报数,数到第m的人又出列,…,如此反复直到所有的人全部出列为止。Josephus问题是:对于任意给定的n和m,求出按出列次序得到的n个人员的序列,如n=8,m=4时,输出序列是48521376。-cyclic Chain Solutions Josephus problem. N with the individuals sitting around a round table, it is from a few individuals reportedly began, a few of the m people out of ranks. Stand up and then the next person reported several fresh start, a few of the m out of the people out, ... so repeatedly until all of the people all out far out. Josephus question is : for any given set of n and m, sought out the out of order n is the sequence, if n = 8, m = 4, Sequence is 48521376.
Date
: 2008-10-13
Size
: 944byte
User
:
海薇
[
assembly language
]
xunhuanlianbiao-Josephus
DL : 0
用循环链表解Josephus问题。设有n个人围坐在一个圆桌周围,现从第1个人开始报数,数到第m的人出列,然后从出列的下一个人重新开始报数,数到第m的人又出列,…,如此反复直到所有的人全部出列为止。Josephus问题是:对于任意给定的n和m,求出按出列次序得到的n个人员的序列,如n=8,m=4时,输出序列是48521376。-cyclic Chain Solutions Josephus problem. N with the individuals sitting around a round table, it is from a few individuals reportedly began, a few of the m people out of ranks. Stand up and then the next person reported several fresh start, a few of the m out of the people out, ... so repeatedly until all of the people all out far out. Josephus question is : for any given set of n and m, sought out the out of order n is the sequence, if n = 8, m = 4, Sequence is 48521376.
Date
: 2026-01-09
Size
: 1kb
User
:
海薇
[
assembly language
]
Josephus
DL : 0
第一次上传的程序,是《C++程序设计教程》系列的部分辅助代码。作者是钱能-From the first time the procedure is " C++ Programming Guide" series, some people in the supplementary code. The author is money to
Date
: 2026-01-09
Size
: 43kb
User
:
周建玉
[
assembly language
]
LinkList
DL : 0
约瑟夫环用C++实现,利用顺序表实现的,是符合现在的c++格式-Josephus with C++ achieved using the order form to achieve, is in line with current c++ format
Date
: 2026-01-09
Size
: 34kb
User
:
huanxinmangtu
[
assembly language
]
circular-linked-list-Josephus
DL : 0
约瑟夫环问题 【问题描述】 Josephus排列问题定义如下:假设n个竞赛者排成一个环形。给定一个正整数m≤n,从第1人开始,沿环计数,第m人出列。这个过程一直进行到所有人都出列为止。最后出列者为优胜者。全部出列次序定义了1,2,…n的一个排列。称为(n,m)Josephus排列。例如,(7,3)Josephus排列为3,6,2,7,5,1,4。 【实验要求】 设计求解Josephus排列问题程序。 (1)采用顺序表、单链表或双向循环链表等数据结构。 (2)采用双向循环链表实现Josephus排列问题,且奇数次顺时针轮转,偶数次逆时针轮转。 (3)推荐采用静态链表实现Josephus排列问题 -Josephus Josephus problem [Problem Description] permutation problem is defined as follows: Suppose the n contestants lined up a ring. Given a positive integer m 鈮?n, beginning from the first one, along the ring count, the first man out of the line m. This process continues until everyone is out of the line so far. Finally out of the line by the winner. All the columns defined sequence 1,2, ... n of an order. Called (n, m) Josephus order. For example, (7,3) Josephus arranged 3,6,2,7,5,1,4. Experimental Design [requirements] Josephus permutation problem solving process. (1) using the order form, single chain or two-way circular linked list data structure. (2) using two-way circular linked list implementation Josephus permutation problem, and the odd clockwise rotation, counterclockwise rotation even number of times. (3) recommend the use of a static list to achieve Josephus permutation problem
Date
: 2026-01-09
Size
: 34kb
User
:
张小红
[
assembly language
]
yuesefuhuan
DL : 0
基于C语言数据结构编写的约瑟夫环,内含说明文档-Josephus written based on the C language data structures, containing documentation
Date
: 2026-01-09
Size
: 49kb
User
:
周思彤
[
assembly language
]
yuesehuanwenti
DL : 0
约瑟夫环问题。本程序要求设编号为1-n的n(n>0)个人按顺时针方向围成一圈.首先第1个人从1开始顺时针报数.报m的人(m 为正整数).令其出列。然后再从他的下一个人开始,重新从1顺时针报数,报m的人,再令其出列。如此下去,直到圈中所有人出列为止。-Josephus problem. The procedural requirements set numbered 1-n of n (n> 0) Personal clockwise circle. First 1st person clockwise 1 count off. Who reported m (m is a positive integer). Make it out of the line. And then the next person his start again 1 clockwise report the number of people reported to m, then make it out of the column. And so on until everyone in the circle column so far.
Date
: 2026-01-09
Size
: 1kb
User
:
juwairen
[
assembly language
]
Josephus-problem
DL : 0
描述 约瑟夫问题:有n只猴子,按顺时针方向围成一圈选大王(编号从1到n),从第1号开始报数,一直数到m,数到m的猴子退出圈外,剩下的猴子再接着从1开始报数。就这样,直到圈内只剩下一只猴子时,这个猴子就是猴王,编程求输入n,m后,输出最后猴王的编号。 输入 每行是用空格分开的两个整数,第一个是 n, 第二个是 m ( 0 < m,n <=300)。最后一行是: 0 0 输出 对于每行输入数据(最后一行除外),输出数据也是一行,即最后猴王的编号-Joseph describes the problem: There n monkeys, clockwise circle selected King (numbered 1 to n), No. 1 the beginning of the number of packets, the number has to m, m number of monkeys to exit out of the loop, left under the monkey and then followed start number 1 newspaper. In this way, the circle until only a monkey, the monkey is the monkey, programming seek input n, after m, the number of output last Monkey King. Enter each line are two integers separated by a space, the first is n, the second is m (0 < m, n < = 300). The last line is: 00 Output For each line of input data (except for the last line), the output data is a line that the final number of the Monkey King
Date
: 2026-01-09
Size
: 1kb
User
:
Yilia
[
assembly language
]
met
DL : 0
经典约瑟夫环游戏,系统随机生成每个人的密码,输入开始的数字,从第一个开始报数,报到目标数字被淘汰,并将其密码作为新的目标报数,直至所有人被淘汰,输出淘汰顺序-Josephus classic game system randomly generated each person' s password, enter a start number, starting with the first message number, report target figures to be eliminated, and password as the new target number off, until everyone is eliminated, output eliminated order
Date
: 2026-01-09
Size
: 1kb
User
:
江雪
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.