|
|
вернуться в форумIs O (N log N) the only viable solution ? Is it possible to solve this problem using SQRT-decomposition ? 0.5 second is a very tight limit and in-spite of minor optimizations and fast I/O my code having complexity of O (N * sqrt (N)) is getting TLE on test case 17. I am just curious about the possibility. Re: Is O (N log N) the only viable solution ? Послано mikroz 4 июл 2014 06:48 It is actually a very tough problem when you're using a segments tree, so I do not think that using a SQRT-decomposition is a very good idea. For me the key was to implement the segments tree with iterative update procedure. |
|
|