文件名称:Josephus-
- 所属分类:
- Internet/网络编程
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2013-09-08
- 文件大小:
- 874kb
- 下载次数:
- 0次
- 提 供 者:
- c**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
约瑟夫问题是个有名的问题:N个人围成一圈,从第一个开始报数,第M个将被杀掉,最后剩下一个,其余人都将被杀掉。例如N=6,M=5,被杀掉的人的序号为5,4,6,2,3。最后剩下1号。
假定在圈子里前K个为好人,后K个为坏人,你的任务是确定这样的最少M,使得所有的坏人在第一个好人之前被杀掉。-Josephus problem is a well-known problem: N personal circle, starting from the first report the number of M will be killed first, the last remaining one, the rest will be killed. For example, N = 6, M = 5, the number of people killed 5,4,6,2,3. The last remaining No. 1. Assumed that the first K in circles as a good man, after the K was bad person, your task is to determine this minimum M, makes all the bad guys in a good man before being killed.
假定在圈子里前K个为好人,后K个为坏人,你的任务是确定这样的最少M,使得所有的坏人在第一个好人之前被杀掉。-Josephus problem is a well-known problem: N personal circle, starting from the first report the number of M will be killed first, the last remaining one, the rest will be killed. For example, N = 6, M = 5, the number of people killed 5,4,6,2,3. The last remaining No. 1. Assumed that the first K in circles as a good man, after the K was bad person, your task is to determine this minimum M, makes all the bad guys in a good man before being killed.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
约瑟夫问题\Debug\vc60.idb
..........\.....\vc60.pdb
..........\.....\yuesefu.exe
..........\.....\yuesefu.ilk
..........\.....\yuesefu.obj
..........\.....\yuesefu.opt
..........\.....\yuesefu.pch
..........\.....\yuesefu.pdb
..........\yuesefu.cpp
..........\yuesefu.dsp
..........\yuesefu.dsw
..........\yuesefu.ncb
..........\yuesefu.opt
..........\yuesefu.plg
..........\Debug
约瑟夫问题