文件名称:Josephus
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:714byte
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
编写一个求解Josephus问题的函数。用整数序列1, 2, 3, ……, n表示顺序围坐在圆桌周围的人。然后使用n = 9, s = 1, m = 5,以及n = 9, s = 1, m = 0,或者n = 9, s = 1, m = 10作为输入数据,检查你的程序的正 确性和健壮性。最后分析所完成算法的时间复杂度。定义JosephusCircle类,其中含完成初始化、报数出圈成 员函数、输出显示等方法。-Josephus write a problem solving function. With the sequence of integers 1, 2, 3, ... ..., n the order of sitting around the round table, said the people around. And then use n = 9, s = 1, m = 5, and n = 9, s = 1, m = 0, or n = 9, s = 1, m = 10 as input data, check the correctness of your program and robustness. Completed the final analysis, the algorithm' s time complexity. Definition JosephusCircle class, which included the completion of initialization, reported that the number of member functions of a circle, the output display and other methods.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Josephus.cpp
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.