mincut c implementation done