|
|
вернуться в форумHow to solve it fast? n <= 2400 My AC solution is O(h*n*(m+h) + k*h^2*n*(m+h)) And it uses O(n*(m+h)) of memory. But there are so many AC in 0.015 sec! And some AC program's use less than 200K of memory... I can't invent something like myself :( Please, anybody explain me fast solution for this problem. Re: How to solve it fast? Mail me to Ilya[dot]Grebnov[at]mail[dot]ru Re: How to solve it fast? Послано Kit 15 мар 2006 10:29 It is easy. Tests are weak :) My solution uses 400kb instead of 3Mb and works 0.015s instead of 0.5s. It seems, there are n less then 100 or greater then 5000 always. You can use it. Thank you for your answers :) |
|
|