登录
首页 » 数据结构 » 约瑟夫问题有原始的约瑟夫和发展了的约瑟夫两种。 原始的约瑟夫的描述: 古代某法官要判决N个犯人的死刑,他有一条荒唐的法律,将犯人站成一个圆圈,从第S个人开始数起...

约瑟夫问题有原始的约瑟夫和发展了的约瑟夫两种。 原始的约瑟夫的描述: 古代某法官要判决N个犯人的死刑,他有一条荒唐的法律,将犯人站成一个圆圈,从第S个人开始数起...

于 2022-03-11 发布 文件大小:2.32 kB
0 283
下载积分: 2 下载次数: 1

代码说明:

约瑟夫问题有原始的约瑟夫和发展了的约瑟夫两种。 原始的约瑟夫的描述: 古代某法官要判决N个犯人的死刑,他有一条荒唐的法律,将犯人站成一个圆圈,从第S个人开始数起,每数到第D个犯人,就拉出来处决,然后再数D个,数到的人再处决―――直到剩下的最后一个可赦免。 发展的约瑟夫的描述: 古代某法官要判决N个犯人的死刑,但这N个人每人持有一个密码,他有一条荒唐的法律,将犯人站成一个圆圈,法官先给出一个密码M,从第S个人开始数起,每数到第M个犯人,就拉出来处决,再根据这个人所持有的密码F,然后再数F个,数到的人再处决,以此类推―――直到剩下的最后一个可赦免。-Joseph problems have original development of the Joseph and Joseph two. The original Joseph Description : Ancient a judge to sentence N inmates of the death penalty, he is a ridiculous law, prisoners station into a circle, from S began a few individuals, every few months to D prisoners, pull out executions, then D, the number of people to be re-executed--- until the last one left to be pardoned. The development of the Joseph Description : Ancient a judge to sentence N inmates of the death penalty, but each individual N holders a password, he is a ridiculous law, prisoners station into a circle, the judges first gave a password M, S individuals from the beginning of several, each of the first few inmates M , pull hi

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

发表评论

0 个回复

  • 学生信息管理系统
    直接下载,用vc++6.0打开 可直接运行,数据库为access2003,语言为vc++,适合初学者 直接下载,用vc++6.0打开 可直接运行,数据库为access2003,语言为vc++,适合初学者
    2022-12-25 08:10:03下载
    积分:1
  • 用C实现的基于O
    用C实现的基于O-tree的ic设计布图布线工具源代码,有相关文档-C realized based on O-tree-id wiring layout design tools source code, related documentation
    2022-05-31 07:35:33下载
    积分:1
  • 统计字符出现的频率的哈夫曼编码
    统计字符出现的频率的哈夫曼编码-the frequency of Huffman coding
    2022-01-24 16:36:21下载
    积分:1
  • 骑士漫游的改进算法,回溯算法加贪心选择策略,n最大可以到128...
    骑士漫游的改进算法,回溯算法加贪心选择策略,n最大可以到128-Knight improved roaming algorithms, backtracking algorithms greedy selection strategy increases, n the greatest can go to 128
    2022-06-19 00:15:03下载
    积分:1
  • 中利用栈模拟停车场管理,用C语言编写。
    数据结构中利用栈模拟停车场管理,用C语言编写。-data stack structure using simulated car park management, with C language.
    2022-03-19 00:31:06下载
    积分:1
  • 堆栈之后缀表达式求值
    此程序用的是后缀表达式求值的方法,其中用到了一个栈,而中缀表达式求值需用到两个栈(操作数栈和操作符栈),所以阅读程序前提是了解中缀表达式和后缀表达式 之间的转换,和后缀表达式求值的过程。关于他们之间的转换,我的概括为:中缀表达式:a*(b+c)-d/f  ,先做b+c,即bc+;再做a*(b+c),即abc+*;然后做d/f,即df/; 最后做a*(b+c)-d/f,得abc+*df/-。关于后缀表达式求值过程请参照你的《数据结构指导书》P60~62(下文所指参照页均在此书)。程序里中有些我说的可有可无的东西,我已经说明 程序里只给出了+ - * / 四种运算,其它运算符若需要, 可向程序里插入。你的指导书堆栈实验里提示用到了“运算符重载”,所以添加其他运算时,有可能用到重载,但这里的四则运算我没用到,运算符重载是很重要的
    2022-11-10 19:15:04下载
    积分:1
  • C语言常用算法源代码,原理实现, 对学习应用有参考价值。...
    C语言常用算法源代码,数据结构原理实现, 对学习应用有参考价值。-C language source code commonly used algorithms and data structures to achieve the principle of learning about the application of a reference value.
    2022-02-01 16:31:45下载
    积分:1
  • cutting parts : a given width of the rectangular plate W, the height of rectangu...
    零件切割问题: 给定一块宽度为W的矩形板,矩形板的高度不受限制。现需要从板上分别切割出n个高度为hi,宽度为wi的矩形零件。切割的规则是零件的高度方向与矩形板的高度方向保持一致。问如何切割使得所使用的矩形板的高度h最小? 任给一个输入实例,能输出切割所需要的实际高度并能用图形演示切割的过程-cutting parts : a given width of the rectangular plate W, the height of rectangular plate unrestricted. Need from the board is cutting out respectively n height of the hi, wi width of the rectangular parts. Cutting parts to the rules of the height of the rectangular plate with a high degree of consistent direction. Asked how cutting makes use of the rectangular plate height h minimum? As an input for example, will cut output by the needs of the high and can be used graphic demonstration of the cutting proce
    2022-01-27 17:45:40下载
    积分:1
  • 课程设计,一个简单的银行业务模拟.在c++环境下调试通过.
    数据结构课程设计,一个简单的银行业务模拟.在c++环境下调试通过.-data structure curriculum design, a simple simulation of the banking business. C in the environment through debugging.
    2022-03-19 05:20:54下载
    积分:1
  • 奇妙的二叉树.rar 里面对里的二叉树进行了非常详细的说明,对大家学习有非常大的好处...
    奇妙的二叉树.rar 里面对数据结构里的二叉树进行了非常详细的说明,对大家学习数据结构有非常大的好处-wonderful binary tree. Rar inside of the data structure, the binary tree for a very detailed description of the data structures you learn a lot more benefits
    2022-05-30 05:57:22下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载