文件名称:Cpp6
介绍说明--下载内容均来自于网络,请自行研究使用
设有n个人站成一排,从左向右的编号分别为1~n,现在从左往右报数“1,2,1,2……”,数到“1”的人出列,数到“2”的立即站到队伍的最右端。报数过程反复进行,直到n个人都出列为止。要求给出他们的出列顺序。
例如:n=8,初始序列:1,2,3,4,5,6,7,8
出队顺序为:1,3,5,7,2,6,4,8
-N has a personal stand in a row, left to right are numbered 1 ~ n, left to right and now report the number 1,2,1,2 ...... , a count of 1 of the people out of the line, the number of to 2 immediate stop to the ranks of the extreme right. Reported that the number of process is repeated until all the n individual columns so far. Required to give them the order of columns.
For example: n = 8, the initial sequence: 1,2,3,4,5,6,7,8
A team order: 1,3,5,7,2,6,4,8
例如:n=8,初始序列:1,2,3,4,5,6,7,8
出队顺序为:1,3,5,7,2,6,4,8
-N has a personal stand in a row, left to right are numbered 1 ~ n, left to right and now report the number 1,2,1,2 ...... , a count of 1 of the people out of the line, the number of to 2 immediate stop to the ranks of the extreme right. Reported that the number of process is repeated until all the n individual columns so far. Required to give them the order of columns.
For example: n = 8, the initial sequence: 1,2,3,4,5,6,7,8
A team order: 1,3,5,7,2,6,4,8
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Cpp6.cpp