This problem is in Contest(s) below:
Contest 1331:最小生成树专题
Contest 1492:最小生成树专题