codeforces 920 EFG 题解合集 ( Educational Codeforces Round 37 )
E. Connected Components? time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given an undirected graph consisting of n vertices and edges. Instead of giving you the edges that exist in the graph, we give you m unordered pairs ( x , y ) such that there is no edge between x and y , and if some pair of vertices is not listed in the input, then there is an edge between these vertices. You have to find the number of connected components in the graph and the size of each component. A connected component is a set of vertices X such