update for hdu4009,Directed_MST