登录
首页 » 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 86
下载积分: 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 个回复

  • Excel
    说明:  直接通过ODBC读写Excel表格文件。基于数据库编写源程序。(Directly through ODBC to read and write Excel spreadsheet file. Prepared based on the source database.)
    2008-11-07 23:00:04下载
    积分:1
  • libeXosip2-3.3.0
    libeXosip2-3.3.0编译通过的库程序,带工程。(libeXosip2-3.3.0 compiled by the library program, with the project.)
    2011-07-12 00:19:24下载
    积分:1
  • F407驱动SPI屏幕
    STM32F407驱动SPI屏幕,采用的是模拟SPI(STM32F407 drives SPI screen, using simulated SPI)
    2020-06-21 10:20:01下载
    积分:1
  • a
    说明:  得到函数地址的程序,菜鸟级产品不要笑我 刚学驱动(Adress Of function)
    2009-06-24 10:28:07下载
    积分:1
  • flash
    demo flash for sms800c
    2018-12-09 00:33:48下载
    积分:1
  • U8参照二开文档4
    说明:  u8参照开发文档,教程,表单,单据,列表(U8 Reference Development Documents, Tutorials, Forms, Documents, Lists)
    2020-06-22 22:40:02下载
    积分:1
  • C# program code example!More than hundred.
    C#超多例子!很实用,超过100多个,可应用在实际工程中.-C# program code example!More than hundred.
    2022-08-02 13:11:22下载
    积分:1
  • 11
    说明:  C语言轻松入门的好材料,解释详细,步骤清晰,手把手叫你学习C++(C good material for easy entry, explain in detail, the steps clear, hands tell you to learn C++ )
    2011-05-10 15:03:21下载
    积分:1
  • GpyAnalyse
    把从光谱仪串口传输过来的数据分解为各自的成分数据(Decomposition of the data over the serial transmission from the spectrometer data for each ingredient)
    2012-08-26 10:00:20下载
    积分:1
  • 9682767
    C语言如何使用函数中的局部变量,仅供学习与参考(How to use C language function of the local variable, is only for study and reference)
    2017-08-19 14:31:44下载
    积分:1
  • 696518资源总数
  • 105895会员总数
  • 18今日下载