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 1079. Maximum

How this problem should be approached
Posted by Dinu Cristian M 18 Feb 2005 19:39
Hi all !

Please don't take this the wrong way - I don't want to be offensive or anything, but I've seen many solutions here which employ a method that is, in my humble opinion, highly not recommended: creating a huge array of 100000 ints and simply generating the whole lot in O(N) time - which is both time and memory-consuming. Due to the excessively permissive limits, these solutions actually work, but I believe this isn't how a good coder should solve the problem. Instead, all I can tell you is that a solution exists that needs very little memory (no arrays) and works in O(log N) time.
Re: How this problem should be approached
Posted by makeshiftching 2 Dec 2011 02:00
could you please tell me as a hint??
Is it require a math solution ??
I was puzzled by this problem for a whole day.
thanks in advance.