文件名称:strange-joseph
- 所属分类:
- C#编程
- 资源属性:
- [Windows] [Visual.Net] [源码]
- 上传时间:
- 2015-12-25
- 文件大小:
- 2.57mb
- 下载次数:
- 0次
- 提 供 者:
- 刘**
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
总共有N个人编号1到N,从中取M个人编号1到M围成一圈。从第K个人开始报数(1 ≤ K ≤ M),当轮到报数为L的人时,就将未入圈的人中编号最小者插入此人之后,并从新加入的人开始重复此过程。当插入到最后一个之后,从这个人开始报数,报数为L时就将第L和第(L-1)两人交换然后让交换后的第L个人出列,然后从下一个人开始到报数为L的人然后交换第L和第(L-1)人,让交换之后的第L个人出列,如此反复。问留下最后一个人的编号-A total of N individual numbers 1 to N, which take personal numbers 1 to M M circle. After gettin number (1 ≤ K ≤ M) the first K individuals turn to when the number of people reported as L, the smallest number of people who will not enter into this circle of people, and people are beginning to re-join Repeat process. When inserted into the final after this person Countin, reported that the number is L will be the first L and (L-1) and then let the two exchanged after the first exchange of personal L column, and then start the next person the reported number of people then exchange the first L and L (L-1), let the first L after a personal exchange column, and so forth. Q. The last person to leave the number of
(系统自动生成,下载前可以参看下载内容)
下载文件列表
数算第二次实验
..............\Debug
..............\.....\数算第二次实验.exe
..............\.....\数算第二次实验.ilk
..............\.....\数算第二次实验.pdb
..............\数算第二次实验
..............\数算第二次实验.sdf
..............\数算第二次实验.sln
..............\数算第二次实验.v11.suo
..............\..............\Debug
..............\..............\.....\CL.read.1.tlog
..............\..............\.....\CL.write.1.tlog
..............\..............\.....\link-cvtres.read.1.tlog
..............\..............\.....\link-cvtres.write.1.tlog
..............\..............\.....\link-rc.read.1.tlog
..............\..............\.....\link-rc.write.1.tlog
..............\..............\.....\link.1400-cvtres.read.1.tlog
..............\..............\.....\link.1400-cvtres.write.1.tlog
..............\..............\.....\link.1400-rc.read.1.tlog
..............\..............\.....\link.1400-rc.write.1.tlog
..............\..............\.....\link.1400.read.1.tlog
..............\..............\.....\link.1400.write.1.tlog
..............\..............\.....\link.9120-cvtres.read.1.tlog
..............\..............\.....\link.9120-cvtres.write.1.tlog
..............\..............\.....\link.9120-rc.read.1.tlog
..............\..............\.....\link.9120-rc.write.1.tlog
..............\..............\.....\link.9120.read.1.tlog
..............\..............\.....\link.9120.write.1.tlog
..............\..............\.....\link.read.1.tlog
..............\..............\.....\link.write.1.tlog
..............\..............\.....\vc110.idb
..............\..............\.....\vc110.pdb
..............\..............\.....\另类约瑟夫问题.obj
..............\..............\.....\数算第二次实验.lastbuildstate
..............\..............\.....\数算第二次实验.log
..............\..............\strange Joseph.cpp
..............\..............\数算第二次实验.vcxproj
..............\..............\数算第二次实验.vcxproj.filters