max flow, use the ek algorithm