![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
最短路
WsMiracle
这个作者很懒,什么都没留下…
展开
-
HDU - 3416 Marriage Match IV 求最短路条数
题意:n个点m条边, 求a到b最短路条数。题解:求出a点到所有点的距离, b点到所有点距离, a到b最短路。建一个图, 枚举所有的边,如果此条边在最短路上(dist[a] + dist[b] + wab == mindistab)则加入图中, 容量为1, 超级汇点s连a ,t连b,用dinic 跑一边最大流即可。#include <iostream> #include <cstdio> #inclu原创 2017-08-21 08:34:32 · 259 阅读 · 0 评论 -
hdu-6166 Senior Pan
Problem Description Senior Pan fails in his discrete math exam again. So he asks Master ZKC to give him graph theory problems everyday. The task is simple : ZKC will give Pan a directed graph every t原创 2017-08-23 16:01:56 · 389 阅读 · 0 评论