Subscribed unsubscribe Subscribe Subscribe


Hi everyone, please feel free to have discussions with me!

IOICJ 31 Repeated String ( KMP )

Problem Description: Given string S, find A with minimum length, such that S is equivalent to A being concatenated several times.Constraints: 1≤T≤100 1≤|S|≤1e5 TL: 1000 msSample Input: 3 ababab aaabaaab aaabaaaSample Output: 2 4 7Solution:…