登录
首页 » 其他项目 » 约瑟夫环 1. 本演示程序利用一循环链表,每个结点为一人,类似将人按顺时针方向围坐一圈,每个结点包括,号码,密码.号码是作为排的顺序.密码用来作为下一次报数...

约瑟夫环 1. 本演示程序利用一循环链表,每个结点为一人,类似将人按顺时针方向围坐一圈,每个结点包括,号码,密码.号码是作为排的顺序.密码用来作为下一次报数...

于 2022-07-24 发布 文件大小:39.89 kB
0 233
下载积分: 2 下载次数: 1

代码说明:

约瑟夫环 1. 本演示程序利用一循环链表,每个结点为一人,类似将人按顺时针方向围坐一圈,每个结点包括,号码,密码.号码是作为排的顺序.密码用来作为下一次报数的数字.当走到结尾时,再下个结点便循环回去,依此类推. 2. 演示程序以用户与计算机的对话方式执行,用户输入相应的数据,输出结果显示在其后。,即总结点数,和密码. 3. 程序执行的命令包括:1)创建链表 2)寻找结点 3)删除结点 4. 测试数据测试数据:m初始值20,n=7,7个人密码依次为:3,1,7,2,4,8,4。首先m值为6,正确出列顺序为6,1,4,7,2,3,5。 -Josephus 1. The demonstration program using a chain cycle, each node to a person, similar to a clockwise direction by people sitting circle, and each node include numbers, Password. As the number is the sequence. used as a password the next few reported figures. When reached at the end, the next nodes will cycle back, and so forth. 2. Demonstration Program to computer users with implementation of the dialogue, the corresponding user input data and output results in later. , Summed up the quota, and password. 3. Procedures for the implementation of the order include : 1) Create List 2) Find node 3) delete nodes 4. test data test data : the initial value of 20 m, n = 7, 7 PIN followed : 3,1,7,2,4,8,4. M value fo

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

发表评论

0 个回复

  • 微软报表解析器语言生成器。选择微软的报表之后可以把每个节点生成一个实体类...
    微软报表解析器语言生成器。选择微软的报表之后可以把每个节点生成一个实体类-Microsoft statements language parser generator. Choice of Microsoft
    2023-06-22 15:30:03下载
    积分:1
  • 本系统适用于食品药品管理局机票窗口运输木材…
    本系统适用于林业局票证管理窗口对木材运输证打印管理,是根据林业局需要量身定制的管理系统。  主要功能如下: 一、运输票证信息录入、修改、打印(可根据林业局印刷的证样套打)。 二、运输票证信息字段管理(运输种类管理、材种管理、树种管理、发货单位管理、发证依据管理)。 三、运输票证分类搜索管理(按运输证编号精确查询、按运输工具及车号查询、按运输地点模糊查询、按发货单位模糊查询) 四、运输证统计报表管理。 五、系统超级管理(系统设置、数据备份恢复、管理员角色设置) -the system applicable to the management of FDA ticket window to transport timber certification Print management, According to FDA is required customization management systems. Following major functions : a transport ticket information input, modify, print (FDA may permit the printing kind piling). 2, transport ticket information management field (type of transportation management, timber management, species management, invoice management units, Certification based management). 3, transport ticket classification Search Management (Transport Permit No. precise inquiry by transport equipment and running inquiries, Transport locations fuzzy inquiry, according to the consignor units fuzzy inquiries) 4, transportation management certification
    2022-01-22 12:37:25下载
    积分:1
  • EEPROM (2401) read and write code, written with EMC. Very suitable for beginners...
    EEPROM(2401)的读写代码,用EMC所写.非常适合初学者做为编成时参考.-EEPROM (2401) read and write code, written with EMC. Very suitable for beginners as formation of reference.
    2022-01-25 17:11:38下载
    积分:1
  • 看看这个,呵呵^^ 与大家分享1谢谢支持! 1121
    看看这个,呵呵^^ 与大家分享1谢谢支持! 1121-Take a look at this, huh, huh ^ ^ Thank you to share with you one to support! 1121
    2022-06-20 02:25:17下载
    积分:1
  • A/D转换芯片ADC0832的应用的中文资料
    A/D转换芯片ADC0832的应用的中文资料-A/D conversion chip ADC0832 Application of Chinese information
    2022-01-30 17:39:18下载
    积分:1
  • a useful mimo procedures, we hope to help research
    一个有用的mimo程序,希望对大家的研究有所帮助-a useful mimo procedures, we hope to help research
    2022-03-14 12:38:45下载
    积分:1
  • 一个简单的游戏观看
    一个简单的猜数字游戏-a simple game viewing
    2022-08-23 09:15:58下载
    积分:1
  • javascript decimal 4 to 5 homes
    javascript 小数点4舍5入-javascript decimal 4 to 5 homes
    2022-02-02 16:35:41下载
    积分:1
  • 电力系统分析 随书光盘 源代码, MATLAB编写,有参考价值
    电力系统分析 随书光盘 源代码, MATLAB编写,有参考价值-CD-ROM with the book Power System Analysis
    2022-05-18 04:50:43下载
    积分:1
  • 这是PB的常用函数,对初学者有一定的帮助
    这是PB的常用函数,对初学者有一定的帮助-This is a common function, for beginners is certainly helpful
    2023-06-08 23:05:03下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载