|  | 
|  | 
| вернуться в форум | AC AC this problem is very simple!Try to solve the problem with O(n).
Re: AC Послано pnt  29 июл 2009 16:59Try to solve it in O(log n) //disregarding the input, of course ;)Re: AC Послано kobra  10 авг 2010 17:42the fastest algorithm is O(N+Q). Faster is impossible!Building RMQ doesn't have a sense, because you don't using the operation update.
 | 
 | 
|