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

  • PrinciplesOfComputerOrganization
    计算机组成原理的实验报告,非常完整,一共二十多页,希望对大家有所帮助!(Computer organization lab reports, very complete, a total of more than 20 pages, we want to help!)
    2010-09-01 21:01:20下载
    积分:1
  • big
    visual c++6.0编程实现对图像的缩放处理(vc++6.0 program to achieve the scaling of the image processing )
    2009-04-26 10:30:50下载
    积分:1
  • 支持向量机的C语言程序源码
    这是一段支持向量机器的C语言源代码,包含主函数、核函数还有各种运算(the programe of SVM includeing classfy.c hideo.c learn.c loqo.c)
    2017-11-18 10:17:21下载
    积分:1
  • common_cathode
    说明:  AT80S52 7se segment common cathode interface
    2020-06-21 01:00:02下载
    积分:1
  • DLL依赖项查看工具
    说明:  DLL依赖查看工具 DLL 很稳定的,你只得下载测试。(dllDLL dependent view tool DLL is very stable, you have to download the test.)
    2020-06-25 15:40:02下载
    积分:1
  • 模仿电脑计算器
    模仿电脑计算器做的一个计算器桌面软件,能实现普通的计算器计算。风格基本和电脑一致,想学习的可以下载看看。
    2022-11-30 19:25:03下载
    积分:1
  • 十五数码问题
    十五数码问题的解决,应用c++语言进行编程,采用深度优先搜索算法,在显示问题解决方案的同时显示程序的运行时间。
    2023-06-22 12:35:04下载
    积分:1
  • SocketServerAndClient-C# Socket简单例子(服务器与客户端通信)
    SocketServerAndClient-C# Socket简单例子(服务器与客户端通信)
    2015-05-21下载
    积分:1
  • AT24CXX系列eeprom驱动
    AT24CXX系列驱动文件,采用模拟IIC,基于NXP-KE06单片机应用,可直接移植其他平台; 包含AC24C02,C04,C08,C16,可直接通过宏切换;
    2022-02-05 18:37:36下载
    积分:1
  • Catering-management-system
    本系统有三种操作权限,其中,营业员只可以执行开台、点菜、买单及查询日收入操作;领班可以执行开台、点菜、买单、进货、添加新员工、日收入及月收入查询等操作;经理具有最高权限,除了领班及营业员的操作权限外,还可以设置员工权限、添加商品信息及菜式信息、备份与恢复数据库及初始化数据等操作。(The system has three operating authority, which can only be executed Founding salesperson, a la carte, pay and check daily revenue operations foreman can perform Founding, a la carte, pay, purchase, adding new employees, daily income and monthly income of inquiry operation manager with the highest authority, in addition to the foreman and the operating authority salesperson, you can also set permissions for employees, product information and dishes to add information, database backup and recovery, and initial data and other operations.)
    2014-04-21 13:40:34下载
    积分:1
  • 696516资源总数
  • 106446会员总数
  • 9今日下载