登录
首页 » 电子书 » 3. 约瑟夫环问题。设编号为1,2,…,n(n>0)个人按顺时针方向围坐一圈。开始时任意给出一个报数上限值m,从第一个人开始顺时针方向自1起顺序报数,报到...

3. 约瑟夫环问题。设编号为1,2,…,n(n>0)个人按顺时针方向围坐一圈。开始时任意给出一个报数上限值m,从第一个人开始顺时针方向自1起顺序报数,报到...

于 2022-05-14 发布 文件大小:14.09 kB
0 87
下载积分: 2 下载次数: 1

代码说明:

3. 约瑟夫环问题。设编号为1,2,…,n(n>0)个人按顺时针方向围坐一圈。开始时任意给出一个报数上限值m,从第一个人开始顺时针方向自1起顺序报数,报到m时停止报数,报m的人出列,从他在顺时针方向上的下一个人起重新自1起顺序报数;报到m的人出列;如此下去,直到所有人全部出列为止。用带头结点的单循环链表作数据元素的存储结构。 数据输入: 第一行为人数n。 第二行为报数值m。 数据输出: 依次输出出列人员的编号。 示例: 输入文件input3.txt: 4 3 4 1 3 2 输出:(标准输出) 3 2 4 1 -3. Joseph Central problems. Located numbered 1,2, ..., n (n

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

发表评论

0 个回复

  • GPS卫星定位模块GR
    GPS卫星定位模块GR-85开发资料,支持多频率!定位速度快,就是停车漂移!-GPS satellite positioning module GR-85 development information, support multi-frequency! Positioning speed is stopping drift!
    2022-03-23 23:00:31下载
    积分:1
  • C语言资料大全 学习C语言的辅助材料 编程时可以辅助找到自己想要的详细内容...
    C语言资料大全 学习C语言的辅助材料 编程时可以辅助找到自己想要的详细内容-C language data Guinness learning C programming language support materials can be assisted to find the details you want
    2022-07-26 00:05:31下载
    积分:1
  • 这是很好的一本晶体管分立元件学习资料 作者是日本的
    这是很好的一本晶体管分立元件学习资料 作者是日本的-This is a very good transistor discrete components of information the authors are studying in Japan
    2022-03-18 18:35:01下载
    积分:1
  • 标准化机构ISO/IEC JTC 1 / SC 29 / WG 11,也被称为移动的照片…
    The standardization body ISO/IEC JTC 1/SC 29/WG 11, also known as the Moving Pictures Experts Group (MPEG), was established in 1988 to specify digital video and audio coding schemes at low data rates. MPEG completed its first phase of audio specifications (MPEG-1) in November 1992, ISO/IEC 11172-3. In its second phase of development, the MPEG Audio subgroup defined a multichannel extension to MPEG-1 audio that is backwards compatible with existing MPEG-1 systems (MPEG-2 BC) and defined an audio coding standard at lower sampling frequencies than MPEG-1, ISO/IEC 13818-3.-The standardization body ISO/IEC JTC 1/SC 29/WG 11, also known as the Moving Pictures Experts Group (MPEG), was established in 1988 to specify digital video and audio coding schemes at low data rates. MPEG completed its first phase of audio specifications (MPEG-1) in November 1992, ISO/IEC 11172-3. In its second phase of development, the MPEG Audio subgroup defined a multichannel extension to MPEG-1 audio that
    2022-02-12 22:13:25下载
    积分:1
  • effective C++, very good C++ Advanced books. Likes C++ should not miss the Frien...
    effective C++,非常好的C++进阶类书籍。喜欢C++的朋友不能错过-effective C++, very good C++ Advanced books. Likes C++ should not miss the Friends
    2022-01-25 17:40:53下载
    积分:1
  • it is java sevlet api chm. you can use it to program.
    it is java sevlet api chm. you can use it to program.
    2023-03-23 13:25:04下载
    积分:1
  • Anew trend is creeping into video games at an incredible rate. This trend make...
    Anew trend is creeping into video games at an incredible rate. This trend makes games more realistic, more believable, and in some cases, more fun.
    2022-03-23 03:57:03下载
    积分:1
  • apach服务器的配置
    apach服务器的配置-apach server configuration
    2022-01-28 13:31:54下载
    积分:1
  • 常用算法程序集的程序集
    C语言常用算法程序集配书程序-C language commonly used algorithm for procedure Sets
    2022-03-06 07:03:02下载
    积分:1
  • 作为一种替代的迁移方案,微软提供了一些互操作…
    As an alternate to the migration scenario, Microsoft offers some interoperation solutions (in an interoperation scenario, you don t try to turn the MFC code into .NET automatically, you just try to ensure that they can work together):-As an alternate to the migration scenario, Microsoft offers some interoperation solutions (in an interoperation scenario, you don t try to turn the MFC code into .NET automatically, you just try to ensure that they can work together):
    2022-09-09 04:20:03下载
    积分:1
  • 696518资源总数
  • 104269会员总数
  • 31今日下载