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

Common Board

To Christopher Moh (+)
Posted by Michael_Rybak 19 Jan 2002 01:17
About that problem - why did you say O((log n)^2)?
There's an algorythm with O(log n) for both request and update, and
it was quite easy for me to find it. I suggested to find the
O(n*Sqrt(n)) algorythm because for me it seems to be a bit easier to
implement - anyway, I use it in problems of these kind - it works
quite fast.
Re: To Christopher Moh (+)
Posted by Christopher Moh 19 Jan 2002 07:34
Well, I've thought about it a bit more, and yes, I've thought of the O
(log n) method.  The O((log n)^2) was thought off the top of my head
immediately after I saw the question.

Thanks for your information anyway.