mincut O((n^2)m) alg correct and fast