登录
首页 » C# » Description : Let numbered 1, 2, ..., n (NGT; 0) clockwise direction by individu...

Description : Let numbered 1, 2, ..., n (NGT; 0) clockwise direction by individu...

于 2023-04-25 发布 文件大小:20.54 kB
0 95
下载积分: 2 下载次数: 1

代码说明:

描述:设编号为1,2,…,n(n>0)个人按顺时针方向围坐一圈,每人持有一个正整数密码。开始时任意给出一个报数上限值m,从第一个人开始顺时针方向自1起顺序报数,报到m时停止报数,抱m的人出列,从他在顺时针方向上的下一个人起重新自1起顺序报数;如此下去,直到所有人全部出列为止。要求设计一个程序模拟此过程,并给出出列人的编号序列。 .算法思想: Jeseph函数是实现问题要求的主要函数,其算法思想是:从1至m对带头结点的单循环链表循环计数,到m时,输出该结点的编号值,,再从该结点的下一个结点起重新自1起循环计数;如此下去,直到单循环链表空时循环过程结束。 -Description : Let numbered 1, 2, ..., n (NGT; 0) clockwise direction by individuals sitting around a circle, each holding a positive integer code. At the beginning of a given arbitrary reported few limits on m, started from the first clockwise direction from the starting sequence reported a few, when they report back m reported few, hold out the m out from the clockwise direction in the next personal re-order starting from a newspaper; This situation continues until all people so far shown up. Asked to design a simulation of this process, and give out the number of people out sequence. . Algorithm thinking : Jeseph function is to seek to achieve the main function of the algorithm is thinking : m f

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

发表评论

0 个回复

  • 基于DVB标准的mpeg-2 TS码流播放器源代码
    自己设计的基于DVB标准的mpeg-2 TS码流播放器源代码(Of their own design based on the DVB standard mpeg-2 TS stream player source code)
    2012-07-17 10:06:00下载
    积分:1
  • c-cPPjingdian
    我收集的一些精妙的C代码和一些C++技巧(I collected some sophisticated C code, and some C++ skills)
    2012-12-12 16:52:18下载
    积分:1
  • C#联通网络宽带测试 拨号实例源码
    C#拨号实例
    2014-09-25下载
    积分:1
  • taj mahal
    tajmahal图形项目旧版本的源代码。
    2022-06-12 11:05:04下载
    积分:1
  • 基于视频的电机控制
    包括利用aforge.net对视频的读取,目前是两个视频同时读取,在我的另外程序中包括了3个视频同时读取,并且保存的程序,这个在网上还没有类似的三个视频同时保存的东西。 在视频上进行标记等操作; 串口调试,这个部分十几本功能,小白可以看看; UIrobot使用,主要是一些现有的协议,相对比较简单; WPF基础布局,小白可以看看;
    2022-06-30 10:21:34下载
    积分:1
  • te
    说明:  常规服务质量,QOS模型,QOS可以对网上的数据进行不同的处理(Online data for the different treatment)
    2012-03-20 11:02:48下载
    积分:1
  • CheatEngine62src
    CheatEngine62src. cheat engine里面的部份代码((cheat engine inside part of the code, not read, and pass up with research.))
    2020-06-21 07:00:01下载
    积分:1
  • OpenProtocol
    BTicino的网关通讯协议详细说明,非常详细,看完了就可以自己动手控制BT智能家居了!(BTicino gateway protocol details, very detailed, have read to make your own intelligent home control it!)
    2010-09-19 10:12:08下载
    积分:1
  • ResViewer
    PE文件查看工具及源代码,看雪出品,亲测可用(PE file viewer and source code, to see snow produced, pro-test available)
    2013-09-16 10:26:32下载
    积分:1
  • 面向对象参考试卷
    说明:  面向对象技术与方法期末试卷,BIT 2018-2019-1(Object-Oriented Technology and Method Final Examination Paper)
    2019-06-09 19:08:47下载
    积分:1
  • 696518资源总数
  • 106208会员总数
  • 21今日下载