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

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

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

  • 水平二维均质、各向同性、四周封闭等厚的长方形纯油藏数值模拟
    水平二维均质、各向同性、四周封闭等厚的长方形纯油藏数值模拟 L=400m,D=800m,厚度H=20m,Φ=0.2,Pi=19.61323MPa=20kg/cm3 K=0.2D=200*10-3um2,u=1.5mPa.s,C=1.01972*10-2MPa-1=1.0*10-3(kg/cm2)-1 井位在x=350m,y=250m处,Q=78m3/d,求第676天油藏压力分 采用高斯消元法和LU分解法
    2022-02-06 11:58:31下载
    积分:1
  • C语言课程设计
    C语言课程设计--泊车管理 这是我们C语言课程设计的一个作业。-C language curriculum design parking management This is our C language curriculum design an operation.
    2022-02-26 10:10:54下载
    积分:1
  • How to automate office
    How to automate office
    2022-07-22 09:51:09下载
    积分:1
  • 基于arm的gprs的无线上网的了论文,里面将了写常用的at指令
    基于arm的gprs的无线上网的了论文,里面将了写常用的at指令-Based on the arm of the gprs wireless Internet access a paper, which will be commonly used at the written instruction
    2023-05-02 05:50:02下载
    积分:1
  • failed to translate
    苹果效果的菜单,可以停靠在任何位置,demo提供了左侧和底部的实现-failed to translate
    2022-03-17 18:16:10下载
    积分:1
  • YACC simple description of an interactive calculator, the calculator has 26 regi...
    用简单的YACC描述一个互交的计算器,该计算器有26个寄存器-YACC simple description of an interactive calculator, the calculator has 26 registers
    2022-06-27 13:28:59下载
    积分:1
  • 计算器实现数字的加.减.乘.除等基本运算功能
    计算器实现数字的加.减.乘.除等基本运算功能-increases. Cut. X. In addition to the basic computing
    2022-08-10 15:55:13下载
    积分:1
  • standard I/O input and output tools
    标准I/O输入输出工具 -standard I/O input and output tools
    2022-08-13 07:35:29下载
    积分:1
  • You need to download the general purpose toolbox and the signal toolbox. Y...
    You need to download the general purpose toolbox and the signal toolbox. You need to unzip these toolboxes in your working directory, so that you have toolbox_general/ and toolbox_signal/ in your directory. -You need to download the general purpose toolbox and the signal toolbox. You need to unzip these toolboxes in your working directory, so that you have toolbox_general/ and toolbox_signal/ in your directory.
    2022-07-10 09:18:36下载
    积分:1
  • 编写程序计算三门课的平均成绩,要求应用程序分别用Java语言三种不同的循环语句实现,每门课的成绩用Math类的random()方法随机产生(random()产生...
    编写程序计算三门课的平均成绩,要求应用程序分别用Java语言三种不同的循环语句实现,每门课的成绩用Math类的random()方法随机产生(random()产生的数值在0和1之间),成绩范围为40~100。 提示:自定义一个类,该类实现一个返回随机数的函数。在main函数里测试时直接调用该类的获取随机数方法。 获得随机数相关的类为:java.lang.Math 需要时可引入该类即:import java.lang.Math -Write a program grade point average calculation of three lessons to require the application were used Java language in three different loop realization of the achievements of each course with the Math class, random () method of randomly generated (random () produces values between 0 and between 1), results range from 40 ~ 100. Tip: Customize a class that implements a function to return random numbers. In the main function, where the test is called the class to obtain a direct method of random numbers. Obtain a random number associated category: java.lang.Math necessary for the introduction of the class that is: import java.lang.Math
    2022-07-05 00:59:52下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载