首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > 约瑟夫斯写的问题解决功能。用整数序列的1,2,3…

约瑟夫斯写的问题解决功能。用整数序列的1,2,3…

  • 资源大小:592.00 B
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:1次
  • 资源积分:1积分
  • 标      签: Windows开发

资 源 简 介

编写一个求解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

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP
0.292172s