文件名称:acm
介绍说明--下载内容均来自于网络,请自行研究使用
一道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