Description
给定一张N个点,M条边的有向图,求从起点S到终点T的第K短路的长度,路径允许重复经过点或边。其中 1≤S,T≤
N≤1000,0≤M≤〖10〗^5,1≤K≤1000。注:不熟悉最短路的读者可以简单浏览0x61节,或者假设我们能够在一张
图上求出单源最短路(从一个点出发到其他所有点的最短路径长度),然后在此基础上考虑本题。
Description
"Good man never makes girls wait or breaks an appointment!" said the mandarin duck father. Softly touching his little ducks' head, he told them a story.
"Prince Remmarguts lives in his kingdom UDF – United Delta of Freedom. One day their neighboring country sent them Princess Uyuw on a diplomatic mission."
"Erenow, the princess sent Remmarguts a letter, informing him that she would come to the hall and hold commercial talks with UDF if and only if the prince go and meet her via the K-th shortest path. (in fact, Uyuw does not want to come at all)"<