登录
首页 » Matlab » 山上有m只猴子要选大王,选举办法如下:所有猴子从1到m进行编号并围坐一圈,从第一号开始按顺序1,2,...n继续报数,凡是报n号的猴子都退出到圈外,照此循环报数...

山上有m只猴子要选大王,选举办法如下:所有猴子从1到m进行编号并围坐一圈,从第一号开始按顺序1,2,...n继续报数,凡是报n号的猴子都退出到圈外,照此循环报数...

于 2022-02-21 发布 文件大小:516.00 B
0 105
下载积分: 2 下载次数: 1

代码说明:

山上有m只猴子要选大王,选举办法如下:所有猴子从1到m进行编号并围坐一圈,从第一号开始按顺序1,2,...n继续报数,凡是报n号的猴子都退出到圈外,照此循环报数,直到圈内只剩下一只猴子时,这只猴子就是大王.输出大王的编号。 -Mountains have m of the monkeys to elect king, method of election are as follows: All monkeys are numbered from 1 to m, and sitting around a circle, to begin from the first order 1,2, ... n continue to report the number of those who reported that n No. The monkeys are out to outsiders the basis of this report the number of cycles until the circle only one monkey, the monkey is king. Output King number.

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

发表评论

0 个回复

  • dist
    说明:  图像间距离测量可以轻松实现,还有大量源码可共分享(Measuring the distance between images can be easily achieved, there are a large number of source code can be a total share)
    2008-11-08 22:10:29下载
    积分:1
  • GUI
    GUI用户界面简单的框架 可以按自己的要求进行修改 实现可视化(GUI The user interface simple framework at his own request to make visual changes )
    2012-04-30 01:50:49下载
    积分:1
  • ofdm-shiyu-pinyutu
    基于MATLAB的OFDM原理仿真程序,含时域和频域(OFDM principles based on MATLAB simulation program, including time domain and frequency domain)
    2014-09-28 21:28:43下载
    积分:1
  • jufang
    模拟电缆局部放电simulink仿真。可用于信号特征量提取和分析之用。(Analog cable partial discharge simulink simulation. It can be used to signal feature extraction and analysis.)
    2021-04-29 11:48:43下载
    积分:1
  • nmfsc
    基于梯度下降的稀疏约束 NMF 算法(NMFsc),之前pudn上也有类似的,但缺少一个程序,这里面都包括了 (Based on gradient descent sparse constraint NMF algorithm (NMFsc), before the pudn has a similar, but the lack of a program, there are included)
    2020-11-01 20:49:54下载
    积分:1
  • hclust
    girachical cluster mat methid
    2009-12-29 01:50:36下载
    积分:1
  • fwgougqc
    我在毕业设计时做的一个MATLAB实现图像的SIFT特征提取程序,并做在不同光照、不同视角下的 vZnbfT 特征匹配,还做了 zSCjeKh 特征值的提取转换,编译通过(I graduated the design of a MATLAB to achieve the image of the SIFT feature extraction process, and do in different light, different angles of the vZnbfT feature matching, but also to do the zSCjeKhfeature extraction and conversion, the compiler through)
    2016-01-23 13:13:53下载
    积分:1
  • modularfuelell
    matlab based modular fuel cell an ieee based project in which the simultion
    2010-07-04 15:09:37下载
    积分:1
  • handselectcontrolpoints
    本段代码实现了手动选点的matlab配准,在此代码中只选择了3对控制点,同时从结果可以看出手动选点配准的不精确性,为自动选点配准算法的提出提供了实验依据(This code implements manually selected point matlab registration, in this code to select only the three pairs of control points, and the results can be seen from the point of registration manually selected imprecision, with the choice of site for the proposed automatic registration algorithm provide an experimental basis)
    2014-02-21 20:31:21下载
    积分:1
  • 基于形状的图像检索
    使用不变矩的特征提取方法进行图像的检索,相似度的计算使用的是欧几里德的算法,同时检索过程显示灰度图像和二值图像,并对检索的结果进行分析。
    2022-12-21 15:35:03下载
    积分:1
  • 696518资源总数
  • 105717会员总数
  • 10今日下载