登录
首页 » C# » Description : Let numbered 1, 2, ..., n (NGT; 0) clockwise direction by individu...

Description : Let numbered 1, 2, ..., n (NGT; 0) clockwise direction by individu...

于 2023-04-25 发布 文件大小:20.54 kB
0 139
下载积分: 2 下载次数: 1

代码说明:

描述:设编号为1,2,…,n(n>0)个人按顺时针方向围坐一圈,每人持有一个正整数密码。开始时任意给出一个报数上限值m,从第一个人开始顺时针方向自1起顺序报数,报到m时停止报数,抱m的人出列,从他在顺时针方向上的下一个人起重新自1起顺序报数;如此下去,直到所有人全部出列为止。要求设计一个程序模拟此过程,并给出出列人的编号序列。 .算法思想: Jeseph函数是实现问题要求的主要函数,其算法思想是:从1至m对带头结点的单循环链表循环计数,到m时,输出该结点的编号值,,再从该结点的下一个结点起重新自1起循环计数;如此下去,直到单循环链表空时循环过程结束。 -Description : Let numbered 1, 2, ..., n (NGT; 0) clockwise direction by individuals sitting around a circle, each holding a positive integer code. At the beginning of a given arbitrary reported few limits on m, started from the first clockwise direction from the starting sequence reported a few, when they report back m reported few, hold out the m out from the clockwise direction in the next personal re-order starting from a newspaper; This situation continues until all people so far shown up. Asked to design a simulation of this process, and give out the number of people out sequence. . Algorithm thinking : Jeseph function is to seek to achieve the main function of the algorithm is thinking : m f

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

发表评论

0 个回复

  • GNU_Makefile
    本文比较完整的讲述GNU make工具,涵盖GNU make的用法、语法。同时重点讨论如何为一个工程编写Makefile。作为一个Linux程序员,make工具的使用以及编写Makefile是必需的。系统、详细讲述make的中文资料比较少,出于对广大中文Linuxer的支持,本人在工作之余,花了18个多月时间完成对“info make”的翻译整理,完成这个中文版手册。本书不是一个纯粹的语言翻译版本,其中对GNU make的一些语法和用法根据我个人的工作经验进行了一些详细分析和说明,也加入了一些个人的观点和实践总结。本书的所有的例子都可以在支持V3.8版本的GNU make的系统中正确执行。(This article about the complete GNU make tool, covering GNU make use of grammar. Also focus on how to prepare a project Makefile. As a Linux programmer, make use of tools and the preparation of Makefile is required. System, a detailed account of the Chinese make relatively little information, for the support of the majority of Chinese Linuxer, I in his spare time, spent more than 18 months to complete the "info make" translation finishing, complete the Chinese version of the manual. This book is not a pure language translated version, in which the GNU make some grammar and usage based on my personal experience carried out some detailed analysis and description, also added some personal views and practice summary. All of the examples in this book can support V3.8 version of GNU make the system run correctly.)
    2013-11-17 06:59:14下载
    积分:1
  • deta
    提供一个功能非常完善的系统托盘类,该类可以实现以下功能:任务栏重建后托盘图标自动添加;托盘图标可以动态改变,(Provides a fully functional system pallet class, this class can achieve the following functions: the taskbar reconstruction of the tray icon automatically added, pallet icon can be dynamically changed,)
    2018-12-24 00:06:34下载
    积分:1
  • source
    统计控件,折线图。饼形图。自定义统计控件。更好的完成统计部分功能。为新手提供demo(Statistical control, line chart. Pie chart)
    2011-05-31 11:32:44下载
    积分:1
  • serialcomm-master
    Serial Communication
    2015-06-18 16:34:58下载
    积分:1
  • SharpZipLib 第三方解压缩示例源码以及dll下载
    SharpZipLib 第三方解压缩示例源码以及dll下载
    2013-08-30下载
    积分:1
  • LS
    说明:  对最小二乘法,进行了MATLAB仿真分析,性能不错(Of least squares, for the MATLAB simulation, good performance)
    2011-07-04 16:26:41下载
    积分:1
  • Unity语音识别
    Unity接入讯飞语音SDK工程文件,完成语音在线识别功能
    2023-04-18 00:40:07下载
    积分:1
  • camshift-meanshift全自动跟踪
    背景差分提取前景,camshift跟踪,解决了传统的 CamShift 目标跟踪算法在跟踪目标之前需要手动选择目标区域的问题,边检侧边跟踪,效果较好
    2022-04-01 00:52:13下载
    积分:1
  • desquirr
    decompiler, ida的插件代码,可以反编译asm(Decompiler, Ida plug-in code, the compiler can be anti-asm)
    2006-06-26 14:22:06下载
    积分:1
  • 代码IEEE802.15.4_opnet_simulation_model_v3.0
    这是 IEEE 802.15.4. xvv代码
    2020-07-06 15:38:57下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载