update for tjoj2248,Directed MST