登录
首页 » 算法 » 约瑟夫问题。有N个人围成一圈,按顺序编号。从第一个人开始报数,疏导m时候该人退出,并且下一个从1开始报数。求出圈人的顺序。...

约瑟夫问题。有N个人围成一圈,按顺序编号。从第一个人开始报数,疏导m时候该人退出,并且下一个从1开始报数。求出圈人的顺序。...

于 2022-08-15 发布 文件大小:1.12 kB
0 73
下载积分: 2 下载次数: 1

代码说明:

约瑟夫问题。有N个人围成一圈,按顺序编号。从第一个人开始报数,疏导m时候该人退出,并且下一个从1开始报数。求出圈人的顺序。-Joseph problems. There are N individuals and form a circle, according to sequentially numbered. Starting from the first person reported that the number of times to ease the person out of m, and the next one starting from a newspaper a few. Find the circle of people order.

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

发表评论


0 个回复

  • 飞思卡尔电磁组程序
    此项目信纸被为了让你启动并运行快速与 MC9S12DG128B 的 CodeWarrior。它是为所选的 CPU 和目标连接设置但是,可以容易地修改。
    2022-06-26 09:06:31下载
    积分:1
  • 贝塞尔曲线
    构建三次贝塞尔曲线 C0,......,Cn-1 中 参数形式,Ci 由 (xi(t),yi(t)) = (a0(i) + a1 (i) * t + a2 (i) * t ^2 + a3 (i) * t ^3, b0(i) + b1 (i) * t + b2 (i) * t ^2 + b3(i)*t^3) 0 为 < = t < = 1 由左终结点 (x(i),y(i)), 离开了 guidepoint (x+(i),y+(i))、 右端点 (x(i+1),y(i+1)) 和 右 guidepoint (为每个 i x-(i+1),y-(i+1)) = 0,1,......,n-1 ; 输入的 n,((x(i),y(i)),我 = 0,...,n), ((x+(i),y+(i)),我 = 0,...,n-1), ((x-(i),y-(i)),我 = 1,...,n)。 输出系数 (a0(i)、 a1(i)、 a2(i)、 a3(i)、 b0(i)、 b1(i)、 b2(i)、 b3(i)、 我 = 0,...,n-1)。
    2022-02-16 09:27:40下载
    积分:1
  • 一款埃及学生用Matlab编的的基于PSO的PID整定程序
    一款埃及学生用Matlab编的的基于PSO的PID整定程序,使用方法详见程序注释。-Tunning of PID controllerusing Bacterial Foraging Orientec by Particle swarm optimization My work hasbeen accpepted in GECCO 2008 as Graduat Student workshop. I have used thistechique in PID tunning and i got better result thatn BG and PSO Author: WaelMansour (wael192@yahoo.com) MSc Student, Electrical Enginering Dept, Faculty ofEngineering Cairo University, Egypt
    2022-01-22 02:28:21下载
    积分:1
  • TEST a program
    gdsfgdfgd fgdf gd g df gd fg dfg
    2022-01-22 10:36:48下载
    积分:1
  • 人工智能A*求解八数码
    运行环境说明(2013.11.22) 1.操作系统: ubuntu 13.10 2.集成开发环境: geany-1.23.1 + gcc-4.8.1 3.由于linux操作系统与windows操作系统采用不同的编码格式,在windows下查看相关文档或源代码可能会有乱码问题,如需调试运行,请迁移到相关环境。
    2022-08-18 17:06:11下载
    积分:1
  • Hash大全
    Hash算法大全,收集于互联网,包含:旋转hash,混合hash算法,输出64位的值,AP算法,DEK算法,DJB算法,Thomas Wang的算法,整数hash,ELF算法,SDBM算法,BKDR算法,等
    2022-05-05 08:28:14下载
    积分:1
  • featflow1.3RC10, finite element
    featflow1.3RC10,有限元-流体,老外开发的,不错。-featflow1.3RC10, finite element- fluid, foreign development, yes.
    2022-04-25 10:00:34下载
    积分:1
  • 生成条形码的DLL文件及其使用例子
    生成条形码的DLL文件及其使用例子- Production bar code DLL document and its use example
    2022-04-01 10:10:27下载
    积分:1
  • lowercase amount to the amount of capital used in capital letters and lowercase...
    小写金额转大写金额 ,用于在大写和小写金额之间进行相互转换,用DELPHI编写,简单实用-lowercase amount to the amount of capital used in capital letters and lowercase interaction between the amount of conversion, prepared using DELPHI, simple and practical
    2023-05-29 09:20:03下载
    积分:1
  • This is the dichotomy of the source Root
    这是二分法求根的源码-This is the dichotomy of the source Root
    2022-08-12 13:09:16下载
    积分:1
  • 696518资源总数
  • 104524会员总数
  • 16今日下载