### Hepic_Antony_Skarlatos's blog

By Hepic_Antony_Skarlatos, 10 years ago,

Hello!!! I am new here,so I am sorry if this is not the suitable place for asking questions. The problem that I am talking for is that: http://mirror.codeforces.com/contest/443/problem/B I solved that...but I have a question.

In the 3rd testcase,with "abracadabra" it prints 20,because we will split that to "a bracadabra bracadabra",and N will be 10,where N is phrase[i]=phrase[i+N]

I fixed that,to my solution so it is accepted,but still have this question. If N was 7,we would split the phrase like that: "abracad abracad abracad", so the answer would be 21.(21 > 20)

Could have the answer??? Thank you a lot !!!

 » 10 years ago, # | ← Rev. 2 →   0 A tandem repeat of length 2n is string s, where for any position i (1 ≤ i ≤ n) the following condition fulfills: si  =  si  +  nSo, what you shown is not a tandem repeat by definition.
•  » » 10 years ago, # ^ |   0 So to be something tandem repeat,should be repeated only two times?? Or I am wrong again??
•  » » » 10 years ago, # ^ |   0 Yes, it should be repeated exactly to times
•  » » » » 10 years ago, # ^ |   0 Yea but in testcase with "aaabbbb",after the k letters "aaabbbbbbb",b is repeated more than 2 times...
•  » » » » » 10 years ago, # ^ |   0 But string "bbb" is repeated twice
•  » » » » » » 10 years ago, # ^ |   0 Ok,thank you man !!!
•  » » » » » » » 10 years ago, # ^ |   0 you're welcome :)