P3551 [POI 2013] USU-Take-out
题目描述
Little Edna has received the take-out game as a present.
Take-out is a single player game, in which the player is given a sequence of $n$ adjacent blocks, numbered from $1$ to $n$.
Each block is either black or white, and there are $k$ times as many white blocks as there are black ones.
The player's goal is to remove all the blocks by certain permissible moves.
A single move consists in removing exactly $k$ white blocks and a single black block without changing the positions of other blocks.
The move is permissible if there is no "gap" (a space left by a previously taken out block) between any two blocks being removed.
Help poor little Edna in finding any sequence of permissible moves that remove all the blocks.
有n块砖,其中白色是黑色的k倍,求一个消除序列,满足以下条件:
每次消除k+1个砖,其中k块白色,1块黑色,并且这k+1块砖从开始到结束,中间不能路过已经消除过的砖
数据保证有解
输入格式
无
输出格式
无
说明/提示
有n块砖,其中白色是黑色的k倍,求一个消除序列,满足以下条件:
每次消除k+1个砖,其中k块白色,1块黑色,并且这k+1块砖从开始到结束,中间不能路过已经消除过的砖
数据保证有解
返回`TAT1`:同一个位置输出$2$次
返回`TAT2`:输出的$k+1$个位置不满足白色是黑色$k$倍
返回`TAT3`:未按照升序输出或者中间路过已经消除的砖
SPJ provided by @colazcy