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

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

于 2022-03-11 发布 文件大小:2.32 kB
0 284
下载积分: 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 个回复

  • 设计课程实验,二叉树存储设计源码,c语言编写。
    数据设计课程实验,二叉树存储设计源码,c语言编写。-Data design course experiments, binary storage design source, c language.
    2023-08-25 12:45:03下载
    积分:1
  • 实验程序 线性表 栈和队列 二叉树 图 查找 内部排序...
    数据结构实验程序 线性表 栈和队列 二叉树 图 查找 内部排序-Experimental procedures for linear data structures stack and queue table tree diagram to find the internal order
    2023-08-17 09:45:03下载
    积分:1
  • (一) 编写一个程序LAGO7
    (一) 编写一个程序LAGO7-1.CPP,实现二叉树的各种运算,并在此基础上设计一个主程序完成如下功能。 (1) 输出二叉树B; (2) 输出二叉树B的深度; (3) 输出H结点的左、右孩子结点值; (4) 输出二叉树B的宽度; (5) 输出二叉树B的结点个数; 输出二叉树B的叶子结点个数 -(A) to prepare a program LAGO7-1.CPP, to achieve a variety of binary operations, and on this basis, design a main program performs the following functions. (1) output binary tree B (2) The output of a binary tree B of depth (3) The output of H nodes left and right child node value (4) outputs a binary tree B, width (5) output node B, the number of binary trees (6) outputs a binary tree B, the number of leaf nodes
    2023-02-06 07:20:04下载
    积分:1
  • 这是利用只是写的一个宾馆客房管理小程序,可以完成基本的管理程序的功能,包括输入输出信息,输入修改记录等。...
    这是利用数据结构只是写的一个宾馆客房管理小程序,可以完成基本的管理程序的功能,包括输入输出信息,输入修改记录等。-This is the use of the data structure is written in a hotel room management of small programs that can perform basic functions of management process, including the input-output information, input modify the records.
    2022-06-12 10:42:50下载
    积分:1
  • 使用VB6的租赁信息管理系统生产的产品开发…
    用VB6开发商品出租信息管理系统 用VB6开发商品出租信息管理系统-For product development using VB6 lease information management system for product development using VB6 lease information management system
    2022-02-06 07:49:28下载
    积分:1
  • 导出Access、Sql Server库表到Html vb源吗,调试通过
    导出Access、Sql Server数据库表到Html vb源吗,调试通过-derived Access, SQL Server database tables to Html vb source yet, through debugging
    2023-03-18 04:55:04下载
    积分:1
  • 的乘法
    应用背景应用数组 可以实现的算法和解决的问题非常多,这里举 一个非常典型的例子一一大整数 乘怯 。这个例子所采用的方法和思想都非常巧妙  。由于计算机的精度是有限的,因此单纯使 用程序设计语言提供的原子数据类型来完成两个大整数的乘法显然是不切实际的。 关键技术可以考虑 用两个数组来分别存储 一些小于 10 的整数 ,这些数字按顺序排列在一起,分别表 示一个大整数的每一位上的数字,于是大整数的储存问题就解决了。然后按照基本乘法规则对这两个 大整数进行运算即可。下面给出了程序的代码。
    2022-02-07 02:59:09下载
    积分:1
  • 1. 问题描述设计一个国际象棋的马踏遍棋盘的演示程序。2. 基本要求将马随机放在国际象棋8*8棋盘的某个方格中,马按走棋规则进行移动。编制非递归程序,求出马的行...
    1. 问题描述设计一个国际象棋的马踏遍棋盘的演示程序。2. 基本要求将马随机放在国际象棋8*8棋盘的某个方格中,马按走棋规则进行移动。编制非递归程序,求出马的行走路线,将数字1,2,3,4,…,64依次填入一个8*8方阵。-1. Problem description design of a chess board Ma travels in the demonstration program. 2. Ma basic requirements on random chess 8* 8 chessboard in a box, according to Ma go mobile chess rules. Preparation of non- recursive procedure, and seeking stepped routes, the number 1,2,3,4 ..., 64 were filled an 8* 8 matrix.
    2023-05-30 01:50:03下载
    积分:1
  • This a collection of algorithms for sorting and searching.
    This a collection of algorithms for sorting and searching.
    2023-04-13 06:05:04下载
    积分:1
  • 连接到Oracle库从Fortran代码
    从fortran编译器生成的exe文件连接ORACLE DB的示例代码。本程序通过oracleserver8.05和9i测试,使用了一些表中的数据。需要Oracle TNS名称文件进行连接。
    2022-12-03 11:10:03下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载