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

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

于 2022-07-24 发布 文件大小:39.89 kB
0 259
下载积分: 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 个回复

  • 单片机DAC0832方波锯齿波自己做的验证过
    单片机DAC0832方波锯齿波自己做的验证过-DAC0832 Singlechip sawtooth square had its own authentication
    2023-06-20 22:45:02下载
    积分:1
  • TCL2543电压表中的应用,能通讯的测量表,内存的分配
    TCL2543电压表中的应用,能通讯的测量表,内存的分配-TCL2543 voltage meter application that can communicate measurement tables, memory allocation
    2022-03-10 12:48:00下载
    积分:1
  • with visua basic language for the majority of operations code.
    用visua basic语言开发的进行大数运算的代码。-with visua basic language for the majority of operations code.
    2023-06-16 09:55:04下载
    积分:1
  • 一个关于滤波器设计的小程序
    一个关于滤波器设计的小程序-a filter designed for small programs
    2022-08-19 11:07:57下载
    积分:1
  • 将USB端口设备虚拟为网卡设备的软件,还可以
    将USB端口设备虚拟为网卡设备的软件,还可以-The USB port equipment for the virtual network adapter software, you can
    2022-01-27 12:19:17下载
    积分:1
  • 库存销售系统
    inventory sales system
    2022-02-05 17:18:19下载
    积分:1
  • 操作系统目录管理
    操作系统目录管理-OS directory management
    2023-08-18 18:10:02下载
    积分:1
  • yes
    上传点一般般的东西,主要是想下载点有用的东西,-yes
    2022-03-13 01:36:48下载
    积分:1
  • 雷曼,经典动作小游戏的源码
    雷曼,经典动作小游戏的源码-Lehman, a small classic games FOSS
    2023-02-27 22:00:03下载
    积分:1
  • 程序目的: 输入一个任意大小的迷宫,用栈求出一条走出迷宫的路径,并 显示在屏幕上。 程序实现: 可以实现载入迷宫和保存迷宫,附带文件中有4个测试迷宫路径的 文件...
    程序目的: 输入一个任意大小的迷宫,用栈求出一条走出迷宫的路径,并 显示在屏幕上。 程序实现: 可以实现载入迷宫和保存迷宫,附带文件中有4个测试迷宫路径的 文件test1~4.dd。请将这些文件拷贝到TC当前目录下,或者在载 入时写明完全路径。由于屏幕大小的限制,当用户自己输入迷宫 时一定要注意:迷宫大小是有限制的,不小于4*3,不大于30*20。 否则会出现错误信息。输入开始时全是墙,用上下左右键移动, 用Del键删除墙,形成通路,用Enter键添加墙。输入结束时可以 将迷宫保存下来,以dd为扩展名。输入完毕时用F9键来得到结果, 找到路径时,屏幕下方会出现Path found,否则出现Path not found。 程序经Turbo C 2.0编译调试成功。运行时不用添加任何运行库。 不可以在VC上编译。-procedures purpose : to bring in a maze of arbitrary size, with a stack get out of the maze of trails and on the screen. Program : can achieve and preserve the printed maze maze, the accompanying documents were four test maze of trails to document test1 4.dd. I would be grateful if those files are copied to the TC current directory, or in the state when fully contained path. Due to restrictions on the size of the screen when the user input labyrinth must pay attention to : the size of the maze is a restriction, not less than 4* 3, not more than 30* 20. Otherwise there will be a wrong message. At the beginning of the importation of a
    2022-08-06 12:51:19下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载