文件名称:acm
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:24.7kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
一道ACM的题,用数学的取余来模拟约瑟夫操作。在源程序里对这个操作有详细的注释。-The Joseph s problem is notoriously known. For those who are not familiar with the original problem: from among n people, numbered 1, 2, . . ., n, standing in circle every mth is going to be executed and only the life of the last remaining person will be saved. Joseph was smart enough to choose the position of the last remaining person, thus saving his life to give us the message about the incident. For example when n = 6 and m = 5 then the people will be executed in the order 5, 4, 6, 2, 3 and 1 will be saved.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
7.cpp
acm.doc
acm.doc
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.