minCut, dp