|
|
вернуться в форумПоказать все сообщения Спрятать все сообщения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. Mail me to Ilya[dot]Grebnov[at]mail[dot]ru 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. |
|
|