This problem is a variant of the Josephus problem which can be solved with segment tree.
这个问题是约瑟夫问题的一个变种,可以用线段树解决。
youdao
应用推荐
模块上移
模块下移
不移动