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

suffix automata
Posted by jlcastrillon 25 Aug 2011 23:37
Could anyone tell me how to solve this task using suffix automata??
Re: suffix automata
Posted by jlcastrillon 27 Aug 2011 03:50
I have already found a way to solve this problem using suffix automata, solution would yield to an O(n^2) time, it's just a simple calculation.
KMP also works efficiently here.