并查集(Union-Find)
Source: PAT A1114 Family Property (25 分) Description: This time, you are supposed to help us collect the data for family-owned property. Given each person's family members, and the estate(房产)info under his/her own name, we need to know the size of each family, and the average area and number of sets of their real estate. Input Specification: Each input file contains one test case. For each case, the first line gives a positive integer N ( ≤). Then N lines follow, each gives the infomation of a person who owns estate in the format: ID Father Mother k C h i l d 1 ⋯ C h i l d k M e s