登录
首页 » 电子书 » 约瑟夫(Joeph)问题的一种描述是:编号为1,2,…,n的n个人按顺时针方向围坐一圈,每人持有一个密码(正整数)。一开始任选一个正整数作为报数上限值m,从第一...

约瑟夫(Joeph)问题的一种描述是:编号为1,2,…,n的n个人按顺时针方向围坐一圈,每人持有一个密码(正整数)。一开始任选一个正整数作为报数上限值m,从第一...

于 2022-08-14 发布 文件大小:304.03 kB
0 156
下载积分: 2 下载次数: 1

代码说明:

约瑟夫(Joeph)问题的一种描述是:编号为1,2,…,n的n个人按顺时针方向围坐一圈,每人持有一个密码(正整数)。一开始任选一个正整数作为报数上限值m,从第一个人开始按顺时针方向自1开始顺序报数,报到m时停止报数。报m的人出列,将他的密码作为新的m值,从他在顺时针方向上的下一个人开始重新从1报数,如此下去,直至所有人全部出列为止。试设计一个程序求出出列顺序。-Joseph (Joeph) a description of the problem is: numbered 1,2, ..., n, n individuals sitting clockwise circle, each holding a password (positive integer). An optional start a positive integer as the number of reported upper limit of m, from the first person to embark on the clockwise direction starting from a reported sequence number, to report the number of m stop reported. Those who reported m out of the column, his password as the new m value, from his home in a clockwise direction on the next person started to re-reported from a few, and so on, until all of the column until all the up. Try a program designed to find out the column order.

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

发表评论

0 个回复

  • it is a good helper for you studing html
    HTML4.0 参考手册 很有帮助.你可以去-it is a good helper for you studing html
    2023-02-22 14:25:03下载
    积分:1
  • C语言实现的表达式求值程序,由用户输入一个中缀表达式,系统自动求值,表达式中只含有加减乘除和括号这5种运算符。...
    C语言实现的表达式求值程序,由用户输入一个中缀表达式,系统自动求值,表达式中只含有加减乘除和括号这5种运算符。-C language implementation of the expression evaluation process from the user to enter an infix expression, the system automatically evaluated, the expression contains only addition and subtraction multiplication and division, and parentheses which five kinds of operators.
    2022-07-11 00:57:34下载
    积分:1
  • Linux 目录结构及主要内容2
    Linux 目录结构及主要内容2-Linux directory structure and main contents of two ~~~~~~~~~~~~~~~~~~~~~
    2022-01-26 02:07:08下载
    积分:1
  • 1. Socket Programming Principle 1.1 Client/server communications model Soc Windo...
    1.套接字编程原理 1.1 Client/server通信模型 1.2 Windows Sockets规范 1.3 套接字 1.3.1 套接字定义 1.3.2分类 1.3.3 套接字的作用 1.3.4端口与地址 1.3.5 套接口属性 2.基本的Windows Sockets API编程 2.1常用函数 2.2 TCP实例 2.3 UDP实例 2.4 Socket 通信阻塞的解决方法 3.MFC下的Socket编程的类 3.1 CAsyncSocket类 3.2 CSocket类 3.3 Windows Sockets:带存档的套接字的工作方式 3.4 流式套接字通信的操作顺序 3.5 使用 CAsyncSocket 类 3.6 从套接字类派生 3.7 套接字通知 3.8 一个使用CSocket类的网络通信实例 3.8.1 服务器端应用程序设计(ServerDemo) 3.8.2 客户端应用程序设计(项目名称ClientDemo) 4.套接字的托管实现 4.1 System::Net::Sockets 命名空间 4.2 实例:一个新邮件检查器 -1. Socket Programming Principle 1.1 Client/server communications model Soc Windows 1.2 kets norms 1.3 Socket socket definition 1.3.1 1.3.3 1.3.2 classification socket role 1.3.4 1.3.5 addresses and port interface attributes two sets. Basic programming Windows Sockets API function commonly used 2.1 2.2 2.3 TCP example UDP Socket Communications examples 2.4 blocked three solutions. MFC Socket Programming under the category of Class 3.2 3.1 CAsyncSocket CSocke t
    2023-02-02 21:10:04下载
    积分:1
  • synplify pro经典教程可以帮助同学大体了解synplify软件的应用。
    synplify pro经典教程可以帮助同学大体了解synplify软件的应用。-synplify pro classic tutorials to help students understand the synplify general software applications.
    2022-10-31 12:00:03下载
    积分:1
  • a real
    一篇关于实时操作系统的好论文,大家可以参考一下-a real-time operating system on a good thesis, we can take a look
    2022-02-22 10:01:26下载
    积分:1
  • This is a C# Database programming examples, would like to use c# Develop web pag...
    这是用C#数据库编程的实例,想用c#开发网页,开发数据库的朋友,这是一份很好的资料哦,里面有5个详细的实例,欢迎参考-This is a C# Database programming examples, would like to use c# Develop web pages, development of databases of friends, this is a very good information Oh, there are five detailed examples are welcome to reference
    2022-03-28 14:37:38下载
    积分:1
  • ARM9系列处理器是英国ARM公司设计的主流嵌入式处理器,主要包括ARM9TDMI和ARM9E...
    ARM9系列处理器是英国ARM公司设计的主流嵌入式处理器,主要包括ARM9TDMI和ARM9E-S等系列。本文主要介绍它们与ARM7TDMI的结构以及性能比较。-ARM9 family processors, the United Kingdom are designed mainstream ARM embedded processors, including ARM9TDMI and ARM9E-S series. This paper mainly introduces the structure with the ARM7TDMI and the performance comparison.
    2022-08-03 09:16:34下载
    积分:1
  • 教你如何制作游戏
    教你如何制作游戏-let you know how to do the game programing.
    2022-06-12 10:44:33下载
    积分:1
  • python核心编程,绝无仅有的好资源!
    python核心编程,绝无仅有的好资源!-python-core programming, only a good resource
    2022-01-22 09:06:03下载
    积分:1
  • 696518资源总数
  • 105540会员总数
  • 37今日下载