并查集解法 https://blog.nowcoder.net/n/01b05570962f4e5b855447428bdc2c12