登录
首页 » Windows开发 » 本程序针对约瑟夫问题的描述:编号为12,……n的n个人按顺时针方向围成一圈,每人持有一个密码(正整数),一开始任选一个正整数作为报数上限值m,从第一个人开始按顺...

本程序针对约瑟夫问题的描述:编号为12,……n的n个人按顺时针方向围成一圈,每人持有一个密码(正整数),一开始任选一个正整数作为报数上限值m,从第一个人开始按顺...

于 2022-10-13 发布 文件大小:1.09 kB
0 191
下载积分: 2 下载次数: 1

代码说明:

本程序针对约瑟夫问题的描述:编号为12,……n的n个人按顺时针方向围成一圈,每人持有一个密码(正整数),一开始任选一个正整数作为报数上限值m,从第一个人开始按顺序时针方向自1开始顺序报数,报道m时停止报数,报m的人处列将他的密码作为新的m值,从他在顺时针方向上的下一个人开始重新从1报数,如此下去,直至所有人全部出列为止。利用单向循环链表存储结构模拟此过程,按照出列的顺序印出各人的编号。 演示程序以用户和计算机的对话方式执行,即在计算机终端上显示“提示信息”下,用户输入循环人数n和每人的密码。-This procedure description specifically for Joseph problem: The serial number is 12, ... The n n individual surrounds the ready-made one circle according to the clockwise sense , each person holds (positive integer) a password, one positive integer beginning to assume a post of selections is upper limits ms numbering off, direction starts the hour hand beginning from the first people according to order from 1 numbering off in proper order , stop numbering off when reporting m, the person place column reporting m looks on his password as new m value , the individual begins to number off again from 1 , getting down like this from his time as soon as going ahead in clockwise sense, until proprietor all till leaving self s place in the ranks.

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

发表评论

0 个回复

  • ISP编程器
    带at89s52时钟的isp程序
    2023-05-25 14:05:03下载
    积分:1
  • vb 自动关机程序
    vb 自动关机程序-vb automatic shutdown procedures
    2022-02-10 00:08:25下载
    积分:1
  • parse EDF File using Python
    EDF(欧洲数据格式)文件一种特定的数据记录格式,一般用来记录某种需要实时记录的信号,例如瞬时的电信号或瞬时的行驶速度,十分的方便,解析起来也很方便。该源码使用的是Python语言编写,运行快速,并有详细的注释。你可以使用代码来进行科学研究,不得进行商业使用。
    2022-05-12 11:03:47下载
    积分:1
  • widows below logs procedures can call other procedures inside, to achieve record...
    widows下面记录日志的程序,可以在其它程序里面调用,实现记录日至的功能。-widows below logs procedures can call other procedures inside, to achieve record functions.
    2022-06-15 17:20:42下载
    积分:1
  • BIG
    BIG-GB(VC)
    2022-04-02 06:16:44下载
    积分:1
  • 模板匹配
    可以实现简单的图片模板匹配。。。。。不过这个是很简单的测试程序,现在还是菜鸟,想获取点资料,希望大神们的指教,,,,,zhiwei huoqu dian jifen a 
    2022-03-18 06:39:31下载
    积分:1
  • 使用libti TIFF位图
    Bitmap to Tiff conversion using Libti
    2022-05-29 13:49:07下载
    积分:1
  • through serial communication with TCPIP
    通过TCPIP与串口通信-through serial communication with TCPIP
    2022-01-25 14:10:44下载
    积分:1
  • 这些源码供MFC初学者使用,因为我自己也在学习MFC。
    这些源码供MFC初学者使用,因为我自己也在学习MFC。-These demos are used for MFC beginners, for I am studying MFC.
    2022-05-26 11:10:52下载
    积分:1
  • Beautiful VB code window.
    漂亮的vb窗口样式,跟vista相仿,而且速度极快。-Beautiful VB code window.
    2023-05-26 13:55:03下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载