文件名称:xunhuanlianbiao-Josephus
介绍说明--下载内容来自于网络,使用问题请自行百度
用循环链表解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.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Josephus.c
www.dssz.com.txt
www.dssz.com.txt
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.