|
|
вернуться в форумПоказать все сообщения Спрятать все сообщенияI used only ~2MB in C#, but want to know how to improve it. Thx. The problem can be solved in O(N) memory. Just read line-by-line and calculate something =) I did a little bit different: I saved NxN matrix using BitArray and after that used 2xN array to culc answers, but I see that its even possible to solve this problem without saving all matrix at all, just 2xN array. |
|
|