并查集(算法描述)
例题: C. News Distribution(第一次打) time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output In some social network, there are n n users communicating with each other in m m groups of friends. Let's analyze the process of distributing some news between users. Initially, some user x x receives the news from some source. Then he or she sends the news to his or her friends (two users are friends if there is at least one group such that both of them belong to this group). Friends continue sending the news to their friends, and so on. The process ends