文件名称:shengsiyouxi
介绍说明--下载内容均来自于网络,请自行研究使用
约瑟夫双向生死游戏是在约瑟夫生者死者游戏的基础上,正向计数后反向计数,然后再正向计数。具体描述如下:30个旅客同乘一条船,因为严重超载,加上风高浪大,危险万分;因此船长告诉乘客,只有将全船一半的旅客投入海中,其余人才能幸免遇难。无奈,大家只得同意这种办法,并议定30个人围成一圈,由第一个人开始,顺时针依次报数,数到第9人,便把他投入大海中,然后从他的下一个人数起,逆时针数到第5人,将他投入大海,然后从他逆时针的下一个人数起,顺时针数到第9人,再将他投入大海,如此循环,直到剩下15个乘客为止。问哪些位置是将被扔下大海的位置。-Two-way game of life and death of Joseph in Joseph living and the dead on the basis of the game, forward reverse count after count, then a positive count. Specifically described as follows: 30 visitors with a boat ride, because of severe overload, combined with wind, big waves, dangerous extreme so the captain told the passengers, and only half of the whole ship into the sea of tourists, the rest can be survived. Helpless, we can only agree with this approach, and 30 people agreed to form a circle, starting from the first individual, report the number of clockwise turn, the number to 9, put him into the sea, and then the next number from the beginning of his , counter-clockwise to the number 5, will he put the sea, then the number of his next anti-clockwise, the clockwise to the number 9, then he put into the sea, and so on, until the remaining 15 passengers so far. Q. What position is the position of the sea will be dropped.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
shengsiyouxi.cpp