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 1941. Scary Martian Word

What is optimal asymptotic?
Posted by Vladimir Plyashkun [CSU] 4 Jul 2013 23:06
What is optimal asymptotic for this problem? My algo has O(M*log(N)) where N - length of scary Martian word, and M - length of text of Ovchinnikov's book, but i have TLE on 21th test
Re: What is optimal asymptotic?
O(M + N) is optimal. But maybe you can succed with your asymptotic if use fast I/O