Блог пользователя Hepic_Antony_Skarlatos

Автор Hepic_Antony_Skarlatos, 10 лет назад, По-английски

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

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
10 лет назад, # |
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  +  n

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