SkyWT

我们的征途是星辰大海。

CodeForces 614E - Necklace 题解:构造

Description

Link

Ivan wants to make a necklace as a present to his beloved girl. A necklace is a cyclic sequence of beads of different colors. Ivan says that necklace is beautiful relative to the cut point between two adjacent beads, if the chain of beads remaining after this cut is a palindrome (reads the same forward and backward).

Read more...