搜索资源列表
Josephu
- 该程序能够解决约瑟夫问题,即n个人围成一圈,每m个人出局一人,求出出列的顺序,并且求出最后留下哪个人-procedures to solve the problem of Joseph, n individuals form a circle, every individual out of the game, a m, sought out the order out, and which was obtained last person
yuecefuhuan
- 实验题目 约瑟夫环 一、 实验目的 用一个循环链表来实现约瑟夫环问题 二、 实验内容 编号为1,2,……,n的n个人按顺序时针方向围坐一圈,每个人吃一个密码。一开始任选一个整数作为报数上限值m,从第一个人开始顺时针自1开始顺序报数,报到m时停止报数。报m的人出列,将他的密码作为新的m值,从它在顺时针方向上的下一个人开始重新从1报数,如此下去直到所有人全部出列。 三、 需求分析 输入m=20;n=7,7个人的密码依次是:3,1,7,2,4,8,4,出列顺序为:6,1,
另类约瑟夫环2
- 这是关于约瑟夫环的一个程序,和其它的有些不同,希望大家指点指点。-This is the part of a Joseph procedures, and other somewhat different, we hope that the guidance instructions.
Cpp1
- 约瑟夫环问题:设有编号为1,2,3……n的n个人顺时针方向围坐一圈,每人有一密码(正整数)。开始时给出一报数上限m,从编号为1的人开始报数,报m的人出列;以后将出列者的密码作为新的m,从顺时针方向紧挨着他的下一个人开始报数……直至所有人出列。-Joseph Central question: has numbered 1,2,3 ... ... n of n individuals clockwise around a circle, each have a password (positive
Joseph
- 1. 本程序中,首先应输入一个值赋给初始报数上限m,人数n应为任意的,程序应能自动保存出列人的序号并将出列的人所持的密码赋给m,再次作为报数上限,然后删除出列人信息。如此循环,直至所有人都出列为止。 2. 程序以用户和计算机的对话方式执行,即在计算机屏幕上显示“提示信息”之后,由用户在键盘上输入相应数据(即每个人所持的密码),每个人的序号由程序自动分配并存储。 -1. This process should first enter a value assigned to the init
joseph
- 设有n各人坐在一圈,并按顺时钟方向从1到n编号,从第s个人开始进行1到m的报数,报到第m个人,此人出圈,再从他的下一个人重新开始从1到m的报数,如此进行下去直到所有的人出去为止。要求按出圈次序每十人为一组,给出这十人的次序表。-Sitting in a circle with each n, and clockwise from 1 to n number of individuals from the first s start from 1 to m of the reported numb
Joseph
- 一种比较简单的实现约瑟夫换的方法,未使用循环链表-A relatively simple method for the realization of Joseph, unused circular linked list
yuesefu
- 数据结构 约瑟夫环 采用无头节点的单链表构成循环链表-Joseph ring data structure without a head node with a single linked list constitutes a circular linked list
yuesefuhuan
- 约瑟夫环 是一个数学的应用问题: 已知n个人(以编号1,2,3...n分别表示)围坐在一张圆桌周围。从编号为k的人开始报数,数到m的那个人出列;他的下一个人又从1开始报数,数到m的那个人又出列;依此规律重复下去,直到圆桌周围的人全部出列。 例如:n = 9, k = 1, m = 5 【解答】 出局人的顺序为5, 1, 7, 4, 3, 6, 9, 2, 8。 -Joseph Wan is the application of a mathematic
yuesefuhuan
- 操作系统实验约瑟夫换有完整的代码和结果截图和注释以及使用说明-The operating system has a complete change experiment Joseph code and the results screenshots and commentary and instructions
joseph
- 约瑟夫环问题 c++解决带有个人密码的约瑟夫环问题-Josephus problem is solved with a personal password Josephus
Joseph-ring-
- 这是一个约瑟夫环数据结构实现程序,当任意给定人数n和密码m后,设计算法求n个人出圈的次序。-Joseph ring which is a data structure implementation procedures, when any given number n and password m, the order of the design algorithm for n personal ones.
Josephus-problem
- 描述 约瑟夫问题:有n只猴子,按顺时针方向围成一圈选大王(编号从1到n),从第1号开始报数,一直数到m,数到m的猴子退出圈外,剩下的猴子再接着从1开始报数。就这样,直到圈内只剩下一只猴子时,这个猴子就是猴王,编程求输入n,m后,输出最后猴王的编号。 输入 每行是用空格分开的两个整数,第一个是 n, 第二个是 m ( 0 < m,n <=300)。最后一行是: 0 0 输出 对于每行输入数据(最后一行除外),输出数据也是一行,即最后猴王的编号-
