Sichuan University Programming Contest 2017 Final(team)

D: Edges in MST