我怀疑我学了个 假的 dinic

P1231 教辅的组成

加几个优化就好了
by _szh_ @ 2019-09-27 07:33:31


搞没搞当前弧呀
by 萌新蒟蒻 @ 2019-09-27 08:08:13


@[生而为人](/space/show?uid=128852) dfs这里: ```cpp if(di>0) { edge[i].dis-=di,edge[i^1].dis+=di; return di; } ``` 从(伪)起点开始会一找到就return,耗时较Dark(大)
by Сталин @ 2019-09-27 10:06:35


~~不知道是不是~~
by Сталин @ 2019-09-27 10:06:55


QAQ
by Сталин @ 2019-09-27 10:08:54


@[Сталин](/space/show?uid=120905) 大佬能说的具体一些吗?
by 生而为人 @ 2019-09-27 13:58:22


@[生而为人](/space/show?uid=128852) ```cpp void dinic() { while(bfs()) while(int val=dfs(s,inf)) ans+=val; } ``` while(int val=dfs(s,inf))这句
by Сталин @ 2019-09-27 19:15:09


~~我真.不是大佬~~
by Сталин @ 2019-09-27 19:15:44


~~因为与源点相连的边不知一条,所以dfs(s,inf)时就会咕咕咕~~
by Сталин @ 2019-09-27 19:17:40


@[Сталин](/space/show?uid=120905) 。。。
by 生而为人 @ 2019-09-27 19:17:56


| 下一页