登录
首页 » c++ » 约瑟夫退圈问题

约瑟夫退圈问题

于 2022-12-22 发布 文件大小:2.49 MB
0 87
下载积分: 2 下载次数: 1

代码说明:

题目要求: 利用循环链表实现约瑟夫退圈问题:n个人(不同id)围成一个圈,从startId(任意数)个开始报数m(任意数)个数,数m的人出列排成新队列,m清零,然后又从下一个人开始数m个数开始,数到m就出列接在新队列尾部,如此重复,直到所有人都出列为止,请输出出列的次序(依次输出出列人员的编号)。

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

发表评论

0 个回复

  • rc522代码模板
    单片机+液晶显示时钟界面,密码修改 rc522移植代码
    2022-09-02 14:20:03下载
    积分:1
  • 基于QT实现的基础图形绘图系统.7z
    说明:  输入椭圆中心和长短轴径; 2. 计算得到中心在原点的椭圆上的第一个点=; 3. 根据公式(1.1.3-2)计算区域1中决策参数的初值为; 4. 在区域1中每个位置处,从开始,反复按照公式(1.1.3-3)更新决策参数,若决策参数小于0则不变,反之加1,一直循环到为止,记第一个满足此条件的点为(); 5. 在区域2的每个位置处,从开始,反复按照公式(1.1.3-6)更新决策参数,若决策参数小于0则不变,反之加1,一直循环到()为止;(Input ellipse center and long and short axis diameter; 2. The first point of the center on the ellipse at the origin is calculated. 3. According to formula (1.1.3-2), the initial value of decision-making parameters in region 1 is calculated. 4. At each location in region 1, the decision-making parameters are updated repeatedly according to formula (1.1.3-3). If the decision-making parameters are less than 0, they will remain unchanged. If the decision-making parameters are less than 0, then add 1 and cycle until the first point satisfying this condition is (); 5. At each location of region 2, the decision parameters are updated repeatedly according to the formula (1.1.3-6). If the decision parameters are less than 0, they will remain unchanged. If the decision parameters are less than 0, then add 1 and cycle until ().)
    2020-11-13 16:49:42下载
    积分:1
  • TestProject
    test return point or point as param
    2007-09-15 10:12:17下载
    积分:1
  • Programming-with-MATLAB-and-Visual-C
    用MATLAB和VisualC_混合编程及应用(Hybrid Programming with MATLAB and VisualC_ and application)
    2013-10-10 14:56:17下载
    积分:1
  • 基于遗传算法的矩形排样UI(1)
    说明:  对于矩形排样的解决,求解许多不一样的小矩形,如何放置在一个大矩形里面(For the solution of rectangular layout, how to place many different small rectangles in a large rectangle)
    2020-06-23 13:40:02下载
    积分:1
  • class
    给定m个n维向量a , a , ,am 1 2  ,向量分类问题要求将相同的向量划分为同一类。试用 抽象数据类型表设计解向量分类问题的有效算法。(Given m a n-dimensional vector a, a,, am 1 2 )
    2008-05-05 22:03:41下载
    积分:1
  • MyProjects
    动物识别专家系统,动物识别专家系统,动物识别专家系统,动物识别专家系统(animal recognition expert system,animal recognition expert system,animal recognition expert system,animal recognition expert system)
    2013-05-07 22:57:16下载
    积分:1
  • cprograming
    C++面向对象的程序设计语言书,易学易用,好理解。 (C++ object-oriented programming language book, easy to use, easy to understand.)
    2010-12-20 18:19:19下载
    积分:1
  • smartsim
    Ok program for enginiring themes
    2013-04-12 14:00:30下载
    积分:1
  • 《啊哈!算法》
    说明:  一本简单的可以作为入门的数据结构书籍,大量的可爱的插图能够让人更好理解数据结构。(A simple data structure book that can be used as an entry, a large number of cute illustrations can make people better understand the data structure.)
    2020-04-12 20:37:38下载
    积分:1
  • 696516资源总数
  • 106442会员总数
  • 11今日下载