登录
首页 » c++ » 约瑟夫退圈问题

约瑟夫退圈问题

于 2022-12-22 发布 文件大小:2.49 MB
0 98
下载积分: 2 下载次数: 1

代码说明:

题目要求: 利用循环链表实现约瑟夫退圈问题:n个人(不同id)围成一个圈,从startId(任意数)个开始报数m(任意数)个数,数m的人出列排成新队列,m清零,然后又从下一个人开始数m个数开始,数到m就出列接在新队列尾部,如此重复,直到所有人都出列为止,请输出出列的次序(依次输出出列人员的编号)。

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

发表评论

0 个回复

  • Snake_App
    一个简单的贪吃蛇游戏的程序,程序运行时会有操作指导。(Snake game is a simple procedure, the program will be run-time operation of the guidance.)
    2007-12-19 12:25:20下载
    积分:1
  • 卡尔曼滤波算法 互补滤波算法
    这个是四轴飞行器或者自平衡小车上面应用的滤波算法,包括卡尔曼滤波算法  互补滤波算法
    2022-09-06 16:55:02下载
    积分:1
  • GetPicServer0513
    接收信号,通过服务控制门禁的开启。vc实现websocket服务和stomp协议(Open access control through service control)
    2017-06-08 18:11:07下载
    积分:1
  • MyCS-VGE
    运用OpenGL实现的一个虚拟场景,里面有山体的渲染、水的渲染、旗帜的渲染、房屋的渲染、下雪场景的渲染、3ds的载入、数据库链接以及路径算法等。 使用方法: P键:在房屋附近的路径上(一定要站在道路上才有效)按P键后,系统自动随机生成一个喜洋洋在地图上,并搜索你目前位置到它的最短路径,并在地面上显示。 空格键:系统只允许人在平地上行走,要实现全方位自由漫游需按空格键。 G键:天气的变化,可以切换下雪天和晴天。 鼠标左键:射击,把出现的喜洋洋射死后,它就自动消失了。 鼠标滑轮:控制移动速度。 其他键的功能自己根据代码探索吧。(Use OpenGL a virtual scene, there are mountains of rendering, rendering the water, the flag rendering, house rendering, snow scene rendering, 3ds loading, database links, and path algorithm. Usage: P key: the path near the house (must stand on the road to be effective) Press the P key, the system automatically generates a random radiant on the map, and search for your current location to its shortest path, and in the is displayed on the ground. Spacebar: The system only allows people to walk on flat ground, to achieve full freedom to roam basis having the spacebar. G key: the weather changes, you can switch snow days and sunny. Mouse button: shooting, shot after the emergence of the radiant, it automatically disappears. Mouse wheel: control movement speed. Other key features to explore their own right under the code.)
    2013-07-31 11:35:39下载
    积分:1
  • 微软语音合成演示DEMO
    本软件在vs2010平台下实现了语音合成(Text to Speech)功能,实现将输入的文字信息转化为声音信息,同时能够选择系统语音库,调节朗读音量以及播放频率等详细参数,同时提供了编译过的exe测试程序,并可以选择测试文本信息。
    2022-03-02 19:43:02下载
    积分:1
  • 智能手环代码,基于F103,心率,体温,摔倒检测,GSM和GPS定位
    一款老龄人健康安全检测手环,包括心率检测,体温检测,摔倒判断,事件发生通过GSM发送短信,同时包含GPS定位
    2022-04-23 17:44:32下载
    积分:1
  • C++ listbox应用源代码
    这个vs下的源代码详细介绍了listbox的用法如果想开发类似的程序可以参考这个listbox就好了,使用的是vc6.0也可以visual stadio打开,ok这个listbox说明了用法,我也是把整个listbox都写出来了,大家可以参考一下了。
    2022-06-17 23:58:23下载
    积分:1
  • Visual C# 读取音频文件并复制到剪贴板
    粘贴剪贴板音频数据并播放,Visual C# 读取音频文件并复制到剪贴板,此外还提供了清空剪贴板上音频数据的功能。下面我们分别来看这几个重点功能具体是如何实现的,代码如下:   private void Button1_Click(object sender, EventArgs e)   {//读取音频文件并复制到剪贴板    Byte[] MyData=System.IO.File.ReadAllBytes("WindowsXP.wav");    Clipboard.SetAudio(MyData);   }   private void Button2_Click(object sender, EventArgs e)   {//粘贴剪贴板音频数据并播放    object MyData =Clipboard.GetData(DataFormats.WaveAudio);    System.Media.SoundPlayer MyPlayer=new System.Media.SoundPlayer();    MyPlayer.Stream = (System.IO.Stream)MyData;    MyPlayer.Play();   }   private void Button3_Click(object sender, EventArgs e)   {//清空剪贴板上的音频数据    Clipboard.Clear();   }   需要完整的可编译源代码项目,请下载本源码。
    2022-01-25 17:41:37下载
    积分:1
  • Atmel_mp3_USB
    本源代码用于使用ATMEL公司的AT89C51芯片实现硬件mp3,其中包括有特色的mp3解码算法和U盘功能读写程序。(Source code for use ATMEL Corporation AT89C51 chip hardware mp3, have characteristics which include mp3 decoding algorithm and U disk function to read and write procedures.)
    2008-08-07 16:10:10下载
    积分:1
  • GANNT
    matlab绘制甘特图的代码matlab绘制甘特图的代码matlab绘制甘特图的代码(matlab code draw Gantt chart code matlab matlab draw Gantt chart drawing Gantt chart code)
    2013-01-08 00:55:19下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载