codeforces 1051F The Shortest Statement

codeforces 1051F The Shortest Statement

简述题意:给出一个图,询问任意两点之间最短路,边比点多不过20。.

Pay attention to the restriction m-n<=20 !!!

反正直接跑dijkstra一定是不可以的!->TLE

所以我们就会很难想到,可以先建一棵树,在树上处理