登录
首页 » Windows开发 » 本程序针对约瑟夫问题的描述:编号为12,……n的n个人按顺时针方向围成一圈,每人持有一个密码(正整数),一开始任选一个正整数作为报数上限值m,从第一个人开始按顺...

本程序针对约瑟夫问题的描述:编号为12,……n的n个人按顺时针方向围成一圈,每人持有一个密码(正整数),一开始任选一个正整数作为报数上限值m,从第一个人开始按顺...

于 2022-10-13 发布 文件大小:1.09 kB
0 179
下载积分: 2 下载次数: 1

代码说明:

本程序针对约瑟夫问题的描述:编号为12,……n的n个人按顺时针方向围成一圈,每人持有一个密码(正整数),一开始任选一个正整数作为报数上限值m,从第一个人开始按顺序时针方向自1开始顺序报数,报道m时停止报数,报m的人处列将他的密码作为新的m值,从他在顺时针方向上的下一个人开始重新从1报数,如此下去,直至所有人全部出列为止。利用单向循环链表存储结构模拟此过程,按照出列的顺序印出各人的编号。 演示程序以用户和计算机的对话方式执行,即在计算机终端上显示“提示信息”下,用户输入循环人数n和每人的密码。-This procedure description specifically for Joseph problem: The serial number is 12, ... The n n individual surrounds the ready-made one circle according to the clockwise sense , each person holds (positive integer) a password, one positive integer beginning to assume a post of selections is upper limits ms numbering off, direction starts the hour hand beginning from the first people according to order from 1 numbering off in proper order , stop numbering off when reporting m, the person place column reporting m looks on his password as new m value , the individual begins to number off again from 1 , getting down like this from his time as soon as going ahead in clockwise sense, until proprietor all till leaving self s place in the ranks.

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

发表评论

0 个回复

  • 網路上找的 generic hid 連線傳輸
    Windows programming You can use Windows" built-in HID (human interface device) drivers to communicate with devices that conform to the USB"s HID class specification. There"s no need for a custom driver; the device uses the drivers included in Windows. Use any programming language that supports calling API functions. The device doesn"t have to have a "human interface." Any device that can function within the limits of the HID specification (control and interrupt transfers only) may be able to be designed as a HID. 请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报
    2022-03-19 19:51:55下载
    积分:1
  • 在MFC对话框中添加登陆界面
    此代码是基于MFC写的,编程语言为C++,编程工具为VS2008,此代码实现了在进入对话框之前弹出一个登陆对话框,如果输入密码错误则打不开对话框,如果密码正确才可以正常登陆
    2022-03-21 01:35:03下载
    积分:1
  • this a game for snake.
    this a game for snake.-this is a snake, vc
    2022-03-07 07:58:10下载
    积分:1
  • Joomla酒店预订系统
    Joomla hotel reservation system
    2022-02-22 10:44:52下载
    积分:1
  • 升 C 类为图像按钮的
    处理按钮上的图像的类。它可以处理该按钮 (悬停、 残疾人士、 压制、 正常) 的四个国家。使用 c-夏普和生成可以在任何 VS 项目导入的库实现。
    2022-08-17 23:06:27下载
    积分:1
  • JavaSE-酒店管理系统源码
    参考视频文件,自己实践搭建环境、手敲代码、调试并实现运行。主要是练习javase内容开发,通过项目,更加熟悉java se相关的api应用,为javaee提供扎实的基础;主要是javase+mysql+eclipse;文件中有sql文件,经过实践,可以应用到sqlserver2017和mysql 5.6.24等数据库中;工程中需要是的依赖jar包,我也是通过调试,在可运行的前提下,更新了一些jar包。
    2022-03-21 03:43:16下载
    积分:1
  • 2440 的 Nand 启动程序。经过测试,可以直接使用
    2440 的 Nand 启动程序。经过测试,可以直接使用-2440" s Nand start the program.
    2022-08-26 13:46:24下载
    积分:1
  • 自动获取TeamViewer密码和ID
    TeamViewer工具很多人不知道怎样获取密码和ID,该工具可以自动获取密码和ID,减少了人们困惑,点击该工具,在自己的界面上就会自动获取密码和ID以及TeamViewer的状态。
    2022-02-12 20:32:25下载
    积分:1
  • smartphone2003 上用evc编译的 短信送程序, api编写
    smartphone2003 上用evc编译的 短信发送程序, api编写-Smartphone2003 EVC compiler used to send the message procedures, api prepared
    2022-05-27 20:05:24下载
    积分:1
  • 建设 NS2 在 windows 系统下使用 Cygwin 的方向
    Leach (低能量自适应聚类层次结构) 那儿 giaothức định tuyến điển hình của mạng cảm ứng không dây 无线传感器网络、 nó dùng để 嗣 tổ chứcvà 滨城 lập các cụm động,thế nên nó có một vấn đề 那儿火热干草 nhiều tiêu đề cụmcó thể ảnh hưởng xấu đối với một mạng 无线传感器网络。Tiểu luận này sẽ thảo luận về chấtlượng dịch vụ của mạng có thể được tối ưu hóa thông việc kiểm soát số tiêuđề cụm 阮教育 thức qua leach 协议。Qua phần mềm 莫 phỏng NS2,Thông < 跨度 style="font-size:16.0pt;line-height:115%;font-family:""> rồi minh họa rằngviệc 滨城 lập các tiêu đề cụm tối ưu có thể làm giảm đi việc tiêu thụ năng lượngvà mở rộng 楚圻 hoạt động của mạng。
    2022-10-12 09:20:03下载
    积分:1
  • 696516资源总数
  • 106658会员总数
  • 16今日下载