CDN加速镜像 | 设为首页 | 加入收藏夹
当前位置: 首页 资源下载 源码下载 Windows编程 其他小程序

文件名称:Garisons-mission

  • 所属分类:
  • 标签属性:
  • 上传时间:
    2016-03-07
  • 文件大小:
    1.19kb
  • 已下载:
    0次
  • 提 供 者:
  • 相关连接:
  • 下载说明:
    别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容来自于网络,使用问题请自行百度

1.需求分析

本题要求循环数数,数到某一个数之后将其排除并从下一个开始重新开始数数,直到剩下一个人为止,要求剩下的人标号为1。我组有两份代码,第一个程序中,输入n值,并数的数至多为3p(p为前n个数最小公倍数,3p为了能够找到规律,n>=7时由于最小周期过大在下面的表格中不便列举),将每种可能的x,y值分组罗列出来,并试图从中找出规律,一旦规律出现,那么我们可以随意举一个符合规律的其他例子来进行验证(验证代码为另一份,而且验证的时候y不再有范围限制,只要符合规律即可)

2.概要设计

本题设计一个循环链表,用来存储n名队员的编号和存活情况(当然了,如果执行任务后安全返回就不需要继续数数了,因此执行任务即视为牺牲),两份代码中均含有两个自定义函数:

soldier *create(int n)//用于创建一个长度为n的循环链表

int judge(soldier *&head,int n)//用于观察小队中人数是否为1

第一份还含有以下两个函数:

int f(int a,int b)//为下面函数服务

int mf(int n)//用来计算前n个数最小公倍数

这两个函数用来帮助我们寻找规律

-1. After the needs analysis of this question requires loop count, count to a certain number of their exclusion and a re-start to count the start until only one person so far, the requirements for the remainder of the label 1. I have two groups of code, the first program, enter the value of n, the number and the number is up to 3p (p n is the number before the least common multiple, 3p in order to find the law, n> = 7 Because the minimum period is too large in the following table lists the inconvenience), the every possible x, y values grouping set out and tried to find out the rules, once the law is present, we are free to cite other examples of a line with the law to carry out verification (authentication code to another, and to verify the time y no limitation, so long to comply with the law) 2. outline of the design problem to design a circular linked list for storing n number of players and survival (of course, if you perform a task after the safe return of a few do not need to
(系统自动生成,下载前可以参看下载内容)

下载文件列表

Garison's mission.cpp

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 搜珍网是交换下载平台,只提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。更多...
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或换浏览器;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*快速评论: 推荐 一般 有密码 和说明不符 不是源码或资料 文件不全 不能解压 纯粹是垃圾
*内  容:
*验 证 码:
搜珍网 www.dssz.com