Choose an edge (u,v) and replace it by two edges, (u,w) and (w,v), where w is a newly inserted vertex. Both of the two edges are of length 1.You need to find out the maximum number of vertices whose minimum distance to vertex 1 is no more than k.
5 4 2
1 2
2 3
3 1
4 5
5