登录
首页 » C# » 【问题描述】 设有n个人围坐在圆桌周围,现从某个位置m(1≤m≤n)上的人开始报数,报数到k的人就站出来。下一个人,即原来的第k+1个位置上的人,又从1开始报数...

【问题描述】 设有n个人围坐在圆桌周围,现从某个位置m(1≤m≤n)上的人开始报数,报数到k的人就站出来。下一个人,即原来的第k+1个位置上的人,又从1开始报数...

于 2022-07-01 发布 文件大小:2.05 kB
0 138
下载积分: 2 下载次数: 1

代码说明:

【问题描述】 设有n个人围坐在圆桌周围,现从某个位置m(1≤m≤n)上的人开始报数,报数到k的人就站出来。下一个人,即原来的第k+1个位置上的人,又从1开始报数,再报数到k的人站出来。依此重复下去,直到全部的人都站出来为止。试设计一个程序求出出列序列。 这是一个使用循环链表的经典问题。因为要不断地出列,采用链表的存储形式能更好地模拟出列的情况。-[n-- with the individuals sitting around the round table is from a certain location m (1 m n) of people reported the number of reported number of people who have come out. Next individuals, that the original clause k a position who reportedly started from a few, and reported that the number of people who come forward. Accordingly continue to repeat until all of the people come out so far. Test procedures designed sought out a sequence out. This is a use of recycled Chain classic problem. Due to the constant up and be using the storage form of Chain better simulate down.

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

发表评论

0 个回复

  • Embedded_Systems
    一本关于嵌入式系统实时概念的著作,举例通俗易懂,主线清晰,是嵌入式入门的不可多得的好书(A real-time embedded systems on the concept works, for example easy to understand, the main line clear, is embedded in a rare book entry)
    2008-05-03 20:03:00下载
    积分:1
  • dsp_foc
    异步电机进行磁场定向控制,d-q轴解耦,间接磁场定向(FOC in asychronous motor)
    2017-11-07 16:45:11下载
    积分:1
  • NN34324
    关于神经网络的文章关于神经网络的文章关于神经网络的文章(Articles on the neural network neural network on the article on the neural network articles)
    2021-02-16 13:09:47下载
    积分:1
  • 信息理论与编码 matlab 代码
    信息理论是数字通信世界优秀部分。在 matlab 模拟他们强加在编码效率方面的挑战。这里是这样的我们将能够运行 Huffan 编码,和其他的代码的一些示例突出编码技术
    2022-09-04 04:05:02下载
    积分:1
  • ZigBee的外置AD0809采集
    zigbee基于协议栈的广播通信和外置AD.zigbee基于协议栈的广播通信和外置AD,zigbee基于协议栈的广播通信和外置AD,zigbee基于协议栈的广播通信和外置AD,zigbee基于协议栈的广播通信和外置AD.
    2023-07-03 08:15:03下载
    积分:1
  • C#程序设计基础,(控制台设计源代码,CS 文件)
    C#程序设计基础,(控制台设计源代码,CS 文件)-Based on C# programming, (console design source code, CS files)
    2022-05-08 02:04:20下载
    积分:1
  • matlab4finalfinal
    是基于STBC的MIMO-OFDM的MATLAB仿真,生成误码率曲线(MATLAB simulation is based on the STBC MIMO-OFDM generate BER curves)
    2020-07-03 05:00:02下载
    积分:1
  • CPP-code-style
    非常经典的C++编码规范,可供项目组参考使用 (The encoding specification very classic C++ available for the project team reference)
    2012-09-25 21:26:55下载
    积分:1
  • USB_ARM7_UDisk
    本文介绍了在基于ARM7的嵌入式系统上开发 USB接口的详细内容。项目使用 ARM7 (MCU处理器)和PDIUSBD12(USB芯片)完成了U 盘的开发。主要内容涉及 USB 接口 的 U 盘开发过程中所涉及的技术内容;重点介绍项目调试方法与步骤;并附上了自己在开 发此项目过程中的一些心得与体会(In this paper, ARM7-based embedded systems developed on the details of USB interface. Projects using ARM7 (MCU processor) and PDIUSBD12 (USB chip) completed the development of U disk. Mainly related to the U disk USB interface development process involved in the technical content focuses on project debugging methods and steps with its own process in the development of this project some of the ideas and experience)
    2009-01-11 21:34:01下载
    积分:1
  • FTP下载
    采用C#语言编写的FTP下载功能包,可以远程登录FTP服务器下载任何想下载的路径,
    2022-08-15 12:11:35下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载