登录
首页 » Visual C++ » Monkey

Monkey

于 2009-12-28 发布 文件大小:1KB
0 223
下载积分: 1 下载次数: 5

代码说明:

  山上有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 个回复

  • Philosophers
    这个程序可以演示关于哲学家就餐的问题,对于理解线程的相互等待有很好的作用(This procedure can be demonstrated on the Dining Philosophers problem, each thread to wait for understanding the role of good)
    2010-01-06 20:31:16下载
    积分:1
  • 1.-PPI
    在EFI架構下寫一隻PPI sample(PEIM to PEIM Interface),使兩隻PEIM可透過此PPI互相傳遞資料. Write a PPI sample to make two PEIMs able to communicate each other.(Write a PPI sample to make two PEIMs able to communicate each other.)
    2013-12-26 15:01:10下载
    积分:1
  • functionguotao
    演化计算是基于随即搜索的新算法;它的技术模型源于自然的演化。下面是一个例子,该函数是典型的多峰(震动剧烈)的函数。用的算法是郭涛算法。(Evolutionary Computation is based on the then new search algorithm its technical model derived from natural evolution. Here)
    2008-04-30 23:55:32下载
    积分:1
  • H1
    说明:  运用相移延拓的方法有效地模拟地震波在介质中的传播路径。(Extension of the use of the phase shift method can effectively simulate seismic wave propagation path in the medium.)
    2015-04-14 10:46:06下载
    积分:1
  • huaxian
    vc与matlab联调,由matlab编写m文件,生成com组件,然后vc调用com组件,完成vc与matlab的接口(FBI vc with matlab, matlab prepared from m file to generate a com component, com component then vc call to complete the vc interface with matlab)
    2009-02-26 20:30:41下载
    积分:1
  • lag
    如何使用MATLAB编程,里面有详细的说明,大家可以试试。满好的教程(How to use the MATLAB programming, which is described in detail, we can try. Man good tutorial)
    2007-11-07 09:02:27下载
    积分:1
  • MexDemo
    matlab开发,在Vs2010里配置matlab调用环境(matlab developer)
    2012-09-15 19:05:33下载
    积分:1
  • cyclostationary_toolbox
    循环谱工具箱,包括二阶循环累积量,循环谱估计的FAM算法(Cyclic spectrum toolbox, including the second order cyclic cumulant, FAM algorithm for spectral estimation cycle)
    2020-10-10 00:17:34下载
    积分:1
  • ch5_matDemo
    高成编写的《matlab接口技术与应用》中例题的源代码(High into the preparation of the " matlab interface technology and applications" in the source code examples)
    2010-10-19 22:14:10下载
    积分:1
  • adjk
    这是MATLAB的控制工具箱。由薛定宇教师编写。这个工具箱用来实现的PID最优程序!(This is the control MATLAB toolbox. Xue prepared by the teachers. This toolbox used to achieve the optimum PID process!)
    2007-04-24 21:40:30下载
    积分:1
  • 696518资源总数
  • 106222会员总数
  • 14今日下载