I appreciate if anyone can help me share his good problems of POIs, just list them in the comments and I'll check them all.
Given a string S of size n. We define
as follows:

In other hand,
is a set of sizes of periods A such that S = AAA...AB(B is a prefix of A).
Now, we want to create the minimum lexicographically string C of size n such that
.
There are k such tests.
1 ≤ k ≤ 20, 1 ≤ n ≤ 250000
________________
3
ABIABUABIAB
BABBAB
BABURBAB
________________
01001101001
010010
01000010
________________
Some of hints only make a good look and may not solve the problem. When you look in that way, you'll come close to the solution. And if you didn't look in that way, you won't get the next hints and you'll get confused in 13 spoilers.
Some problem just used this idea : 526D - Ам Ням и ожерелье
Tell me if you come up with a easier and shorter answer, I'll become glad.
Hope you enjoy the problem :) and it helped you.



in period
suffix is
then you can prove if you copy what you have before in
then you just do like the previous case and check if the last Q characters of the minimum period of





Auto comment: topic has been updated by saliii (previous revision, new revision, compare).
Auto comment: topic has been updated by saliii (previous revision, new revision, compare).