Min cost max flow problem from lightOJ