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 1732. Ministry of Truth

O(N^2) algorithm is sufficient
Posted by Nike (Vologda ML) 21 May 2013 17:36
For example solution number 4974296 time is 0.75. This solution does not use either Z-function or KMP, just std::string::find.

Admins, is it intended solution complexity for this problem or time limit should be decreased to for example 0.5 s?
Re: O(N^2) algorithm is sufficient
Posted by marqueewinq@mipt 23 Oct 2013 03:15
I have tried to solve this problem, using std::find and string, but failed with TL#5.
Can you please explain your idea to me?

My e-mail is: marqueewinq@gmail.com