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

约瑟夫退圈问题

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

代码说明:

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

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

发表评论

0 个回复

  • Year
    一个判断年份,是闰年还是平年的小工具,可以非常方便的查询个个年份(A judge year, or a non-leap year is a leap year a small tool that can be very convenient to check everybody Year)
    2010-02-08 17:15:15下载
    积分:1
  • kuanfang-
    以dac7811带动的宽放的编写程序, 以dac7811带动的宽放的编写程序 以dac7811带动的宽放的编写程序,,(In dac7811 driven liberalization of programmingIn dac7811 driven liberalization of programming)
    2013-09-04 08:26:14下载
    积分:1
  • Netow
    牛顿迭代法(Newton s method)又称为牛顿-拉夫逊方法(Newton-Raphson method),它是牛顿在17世纪提出的一种在实数域和复数域上近似求解方程的方法。多数方程不存在求根公式,因此求精确根非常困难,甚至不可能,从而寻找方程的近似根就显得特别重要。(Newton iteration (Newton' s method) is also known as the Newton- Raphson method (Newton-Raphson method), it is proposed by Newton in the 17th century as a real number domain and in the complex field approximation method for solving equations. Root does not exist in most formula equation, it is very difficult for accurate root, if not impossible, in order to find the root on the approximate equation is of particular importance.)
    2009-05-10 21:10:38下载
    积分:1
  • 基于OpenCV的人脸识别
    OpenCV(开源计算机视觉库)是在BSD许可下发布的,因此它可以免费用于学术和商业用途。它具有C ++,Python和Java接口,并支持Windows,Linux,Mac OS,iOS和Android。OpenCV专为提高计算效率而设计,专注于实时应用。该库以优化的C / C ++编写,可以利用多核处理。通过OpenCL启用,它可以利用底层异构计算平台的硬件加速。
    2022-04-07 06:45:56下载
    积分:1
  • 76676989
    实现钩子,VC++精选编程学习源码,很好的参考资料。(Hook, VC++ select learning programming source code, a good reference.)
    2013-11-28 10:49:43下载
    积分:1
  • 实时汇率查询源码
    一、源码特点        1、获得网络实时汇率。过滤汇率信息,免费分享,欢迎下载 二、注意事项        1、开发环境为Visual Studio 2012,无数据库,使用.net 3.5开发。
    2022-01-25 23:32:47下载
    积分:1
  • C# 在大图中找出小图 例子源码
    在大图中找小图
    2014-11-24下载
    积分:1
  • Class
    大学的每个专业都要编制教学计划。假设任何专业都有固定的学习年限,每学年含两学期,每学期的时间长度和学分上限都相等。每个专业开设的课程都是确定的,而且课程的开设时间的安排必须满足先修关系。每个课程的先修关系都是确定的,可以有任意多门,也可以没有。每一门课程恰好一个学期。试在这样的情况下设置一个教学计划编制程序。三、基本要求:(1):输入参数:学期总数,一学期的学分上限,每门课的课程号,学分,直接先修关系的课程号。(2):课程号尽可能的集中在前几个学期中。(3):若无解,则报告错误信息;否则见教学计划输入到指定的文件中。(University of each professional must prepare teaching plans. Assume that any professional has a fixed period of schooling per academic year with two semesters, the length of time and credits per semester caps are equal. Each professional courses are determined, and arrangements to open the course must meet the Advanced Placement relations. Pre relations are determined in each course, can have any number of doors, or you do not. Each course just one semester. The trial in this case, an instructional planning procedures. Three basic requirements: (1): Input parameters: the relationship between the course of the semester, the total number, the maximum credit for a semester, the course number of each course, credits, direct Prerequisite number. (2): Course No. centralized as much as possible in the first few semesters. (3): If there is no solution, report the error message otherwise see teaching program input to the specified file.)
    2013-01-24 22:12:45下载
    积分:1
  • zuidasiranyima
    最大似然译码 最大似然译码 最大似然译码(Maximum likelihood decoding of maximum likelihood decoding of maximum likelihood decoding)
    2008-12-13 18:53:08下载
    积分:1
  • diansaizuoping
    说明:  全国大学生电子设计优秀作品选集,每个课题都有几种方案可供选择。(National Undergraduate Electronic Design a selection of outstanding works, each of these issues have several options to choose from.)
    2009-08-18 18:11:35下载
    积分:1
  • 696518资源总数
  • 105922会员总数
  • 10今日下载