c algorithm of mincut seems to work