add Maxflow implemented by dinic