Infoshoc's blog

By Infoshoc, history, 7 years ago, In English

Hello,

I had to learn Ukkonen's algorithm in order to solve this question. So I searched something found this, and this, and this, and this. Decided that I understood theory and could proceed to implementation of this problem.

I tried to implement it readably and reliable and tested it a bit and received TL afterwards optimized and got TL with this, so I rewrote code and still got TL and my vacation run to an end.

Can you please help me and tell what am I missing (seems like major difference from e-maxx's implementation is that I am calculating suffix links not on the fly but when coming to next vertex (it is suffix link of previous)

Thank you and kiitos

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

»
7 years ago, # |
  Vote: I like it -19 Vote: I do not like it

sofix tre suKs

  • »
    »
    7 years ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    I beg your pardon, I do not see how to solve first problem without suffix tree. If you do, please share.