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 1713. Key Substrings

Don't waste your time to binary search without hash
Posted by Mahilewets 10 Jul 2017 19:05
I was trying to do the following.
Construct suffix automation for each command.
Binary search for length of each key substring.
Binary search works as follows.
For each substring of command of len (lower_bound+upper_bound) /2 check whether it is a substring of another command.
Re: Don't waste your time to binary search without hash
Posted by Mahilewets 10 Jul 2017 19:06
And it was Time Limit Exceed #7.
So, don't repeat yourself.  Find better solution.
Probably with suffix array,  as posted on the webboard.