ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1706. Cipher Message 2

Faster than using suffix array?
Posted by Vlad 2 Sep 2010 18:17
I naively applied suffix arrays with lcp and got AC in ~2.7s. (complexity N*K*log^2(K))

But I see that there are submissions with times <0.1s. What are the more efficient algorithms?

Someone mentioned suffix-function - any referece for that?
Also it was said that KMP can be used - can anyone explain how exactly it is applicable here?

Thanks in advance.