文件名称:xunhuanlianbiao
介绍说明--下载内容均来自于网络,请自行研究使用
编写一个求解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.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
xunhuanlianbiao.cpp