BC#53 1001 Rikka with Graph
2021-09-30 08:16
As we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them: Yuta has a non-direct graph with nn vertices and mm edges. The length of each edge is 1. Now he wants to add exactly an edge which connects two different vertices and minimize the length of the shortest path between vertice 1 and vertice nn. Now he wants to know the minimal length of the shortest path and the number of the ways of adding this edge. It is too difficult for Rikka. Can you help her?
文章标题:BC#53 1001 Rikka with Graph
文章链接:http://soscw.com/essay/108246.html