登录
首页 » 数据结构 » 求解约瑟夫问题。设有n个人围成一个圆圈坐下,对所有围从的人从某个位置开始编号为1,2,3,……,n,从编号为1的人开始报数1,报数依交进行,报数n的人即出列,下...

求解约瑟夫问题。设有n个人围成一个圆圈坐下,对所有围从的人从某个位置开始编号为1,2,3,……,n,从编号为1的人开始报数1,报数依交进行,报数n的人即出列,下...

于 2022-05-21 发布 文件大小:7.84 kB
0 258
下载积分: 2 下载次数: 1

代码说明:

求解约瑟夫问题。设有n个人围成一个圆圈坐下,对所有围从的人从某个位置开始编号为1,2,3,……,n,从编号为1的人开始报数1,报数依交进行,报数n的人即出列,下一个人从1开始报数,再报数m的人便是第二个出列的人如此重复下去,直到最后一个人出列为止,于是便得到一个出列的顺序,这称之为约瑟夫(Josephu)问题。-solving problems. N individuals have formed a circle to sit down, all right Wai from the start from a position of No. 1, 2, 3, ..., n, for a number of people reported a few, according to several newspaper pay, the newspaper n ie the out, the next person was from the beginning a few , and reported m is the second out of this series continue to repeat until the final out in a series, then get a series out of order, which called Joseph (Josephu) problem.

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 使用SQLite数据库的简单(C #程序)
    资源描述该方案旨在为用户数据的工作提供指导,并在示例代码中的数据库中执行所有操作,例如已实施的行动:添加在SQLite  记录;编辑记录SQLite  ;-删除在SQLite  记录;•显示批记录发现在SQLite  特定记录;等等等等。
    2022-01-22 16:21:58下载
    积分:1
  • 算法是一种字符串匹配算法!源代码介绍…
    bm算法是串的一种匹配算法!本源代码介绍了bm算法的c实现。-bm algorithm is a string matching algorithm! Source code introduced bm Algorithm c achieve.
    2023-05-22 10:20:03下载
    积分:1
  • 数据结构的最短路径算法
    数据结构的最短路径算法-Source codes about how to realize the short path generation for single source graph.
    2022-06-20 23:37:38下载
    积分:1
  • 求矩阵特征值、解方程组
    求矩阵特征值、解方程组 -seeking matrix eigenvalue solution equations for matrix eigenvalue equations Solutions
    2022-03-18 20:26:41下载
    积分:1
  • 中缀表达式转后缀表达式,数据结构中堆栈的应用。
    中缀表达式转后缀表达式,数据结构中堆栈的应用。-Switch to postfix infix notation expressions, the data structure stack applications.
    2022-12-02 07:15:03下载
    积分:1
  • 合并排序给出一组整数和另一个整数,确定是否是O。
    merge sort give a set S of n integers and another integer x, determine whether or not there exits two elements in S whose sum is exactly x.-merge sort give a set of S n integers and anot her integer x, determine whether or not there exits two elemen ts in S whose sum is exactly x.
    2023-04-27 20:45:04下载
    积分:1
  • 使用sqlite3进行存取图片二进制数据
    前段时间在做一款嵌入式项目,用到了SQLite数据库,现在就SQLite数据库中存取图片问题来与大家共享一下,对于二进制数据我们自然是不能够直接进行存储,在SQLite中我们可以将其转换而后存储。 在对主句操作之前我们先要打开数据库,SQLite给用户提供了丰富的API,足以使我们来驾驭它,利用sqlite3_open()函数,打开我们所要操作的数据库,接下来就是对于我们的图片文件的操作了,我在这里的方法便是将图片文件转换成字符流,而后进行存储。
    2023-03-25 20:45:05下载
    积分:1
  • 数据结构课程设计,用C语言编写的约瑟夫环
    数据结构课程设计,用C语言编写的约瑟夫环-data structure course design, preparation of the C language Josephus
    2023-03-28 01:50:04下载
    积分:1
  • 用C++开发餐馆导航系统
    C++控制台程序,在不知道城市方位的情况下对某个城市的餐馆和小吃店进行导航定位。使用链表数据结构,采用继承的方式进行类的编写实现餐馆导航。
    2022-01-24 16:09:06下载
    积分:1
  • 数据结构 Balance
    数据结构 Balance-Bi-Tree 数据结构 Balance-Bi-Tree 数据结构 Balance-Bi-Tr-data structure Balance- Bi-Tree data structure Balance- Bi-Tr ee data structure Balance- Bi-Tree data structure Balance- Bi-Tr
    2023-07-30 19:40:02下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载