牛客练习赛14 E.无向图中的最短距离 (bfs+bitset)
链接:https://www.nowcoder.com/acm/contest/82/E
来源:牛客网
题目描述
有一个n个点的无向图,有m次查询,每次查询给出一些(xi,yi)
令dist(x,y)表示x和y点在图中最短距离,dist(x,x)=0,如果x,y不连通则dist(x,y) = inf
每次查询图中有多少个点v与至少一个这次询问给出的(xi,yi)满足dis...
原创
2018-04-02 15:56:01 ·
193 阅读 ·
0 评论