|  | 
|  | 
| вернуться в форум | TLE Послано Daniel  14 окт 2006 15:37TLE №18Can you please give me any hint?
Re: TLE Try to find algo O(n^(3/2)) or O(n log n )Re: TLE The best solution is O(n). Try to find it.Re: TLE O(n) ????  Are your sure???Strange that fastest solution works in 0.125 seconds...
Re: TLE O(N) is without using any kind of tree , right ? Can I get a hint to this solution? ( I have already solved the problem .. )Re: TLE Послано HASK  15 окт 2006 19:52I got a AC, thx.Re: TLE Please, advice me how to solve this problem? Using binary tree? Thank you.O(N) solution is very simple. Just two loops! (-)Re: O(N) solution is very simple. Just two loops! (-) Послано Daniel  16 окт 2006 20:32I have found this O(N) solution! Just 1 minute thinking.It is really very easy.
 Thank you very much. If I didnt know that there is such solution I would hardly find it :)
Re: TLE  
 Edited by author 17.10.2006 02:22
Re: O(N) solution is very simple. Just two loops! (-) Послано sniper  9 фев 2007 11:40From left and from right(Because b>=a).That's the two loops?!
 
 poor English...
 | 
 | 
|