Hepic_Antony_Skarlatos's blog

By Hepic_Antony_Skarlatos, 7 years ago, In English

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://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 !!!

  • Vote: I like it
  • 0
  • Vote: I do not like it

7 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

A tandem repeat of length 2n is string s, where for any position i (1 ≤ i ≤ n) the following condition fulfills: si  =  si  +  n

So, what you shown is not a tandem repeat by definition.