Add dinic algorithm