I've AC in O^4,but I wonder if there is a O^3 way

code deleted

*Edited by author 13.09.2007 17:11*

Re: I've AC in O^4,but I wonder if there is a O^3 way

Posted by

awpris 12 Sep 2007 20:37

Your Solution C++: time = 0.187

Solutin in Pascal (other algorithm): time = 0.031

Pleace, delete your solution code :)

Re: I've AC in O^4,but I wonder if there is a O^3 way

code deleted

Re: I've AC in O^4,but I wonder if there is a O^3 way

There is an O(n^3) way(my solution is that). First you must save the sum of the elements form the first to each of the others in every row. Then for each column I and each column J

(J>=I) you sum all the rows (using the first step). On each step you check if the sum now is better than the max.If the sum gets below zero you make it zero and continue.

Kiril Kafadarov 1146 C++ Accepted 0.015 197 KB

Re: I've AC in O^4,but I wonder if there is a O^3 way

дай пожалуйста код)