登录
首页 » 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 131
下载积分: 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 个回复

  • h3cxclient_for_win_source
    win下 华为h3c 802.1X V2.20 系列客户端的源程序。本文件概要介绍组成 H3C 应用程序的每个文件的内容,还可作为您编写相应应用程序的起点。 (Huawei h3c 802.1X V2.20-02XX series win under client in Ubuntu Linux system under the corresponding source code.)
    2020-11-03 18:19:53下载
    积分:1
  • SHFB_v1401_Src
    Sandcastle Help File Builder
    2013-12-27 12:55:38下载
    积分:1
  • MFC VS2017 销售管理系统
    用户信息存在login.ini,库存信息存在txt文件
    2019-12-27下载
    积分:1
  • JYNet
    俄罗斯方块 联网版 不错很好,功能齐全。(Networked version of Tetris)
    2011-10-01 09:48:17下载
    积分:1
  • serial2
    打开串口,连接串口,接受来自串口的信息,和向指定串口发送信息(program based on com)
    2018-05-24 16:54:25下载
    积分:1
  • LTE-system-fangzhen
    LTE系统仿真 LTE系统仿真 LTE系统仿真(LTE system simulation LTE system simulation LTE system simulation)
    2013-07-20 12:27:38下载
    积分:1
  • T5577读写
    T5557读写,好用好用的,大家可以自己使用一下(T5557 read and write)
    2020-11-12 15:59:43下载
    积分:1
  • OV5640摄像头模块
    基于stm32的ov5640开发例程(Ov5640 development routines based on stm32)
    2018-02-21 16:35:11下载
    积分:1
  • nRD24_MCU
    NRF24Z1无线耳机程序,NRFZ1高性能无线传输芯片,产品有很强的竞争力(NRF24Z1 wireless headset program, NRFZ1 wireless transmission of high-performance chips, the products are highly competitive)
    2010-11-17 14:33:36下载
    积分:1
  • EX_Database01
    说明:  这是一个数据库访问技术方面的程序,是基于ODBC技术的数据库访问,显示数据库表中的所有记录。(This is a database access technical aspects of the procedure is based on ODBC database access technology, the database shows the table all records.)
    2006-03-21 11:54:54下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载