文件名称:Joseph-Ring
介绍说明--下载内容均来自于网络,请自行研究使用
数据结构题集中“约瑟夫环问题”设编号为1,2,…,n(n>0)个人按顺时针方向围坐一圈,每人持有一个正整数密码。开始时任意给出一个报数上限值m,从第一个人开始顺时针方向自1起顺序报数,报到m时停止报数,抱m的人出列,将他的密码作为新的m值,从他在顺时针方向上的下一个人起重新自1起顺序报数;如此下去,直到所有人全部出列为止。要求设计一个程序模拟此过程,并给出出列人的编号序列-Data structure that centralized Josephus problem set numbered 1,2, ..., n (n> 0) individuals sitting clockwise circle, each holding a positive integer password. Any given at the beginning of a report on the number of limit m, the first person to start a clockwise direction since a report the sequence number, the number of hours stopping newspaper report m, hold m people out of the line, his password as new m value, his next person in a clockwise direction, starting the sequence again since a number off so on until everyone all the columns so far. To design a program to simulate this process, given the number of people out of the column sequence
(系统自动生成,下载前可以参看下载内容)
下载文件列表
约瑟夫环\SCLinList.h
........\约瑟夫环.cpp
........\约瑟夫环.doc
约瑟夫环