Solving bipartite pizza issues using maximum flow