You are given a simple undirected graph with $N$ vertices and $M$ edges. The $i$-th edge is $(a_ i,b_ i)$. Decompose the complement graph of $G$ into connected components.
$N$ $M$
$a_ 0$ $b_ 0$
$a_ 1$ $b_ 1$
$\vdots$
$a_ {M-1}$ $b_ {M-1}$
Print the number of connected components $K$ in the first line. In the next $K$ lines, print as follows. $l$ is the number of vertices of a connected component and $v_ i$ is a vertex index.
$l$ $v_ 0$ $v_ 1$ ... $v_ {l-1}$
If there are multiple solutions, you may print any of them.
4 3 1 0 2 1 1 3
2 3 0 2 3 1 1
6 11 0 1 0 2 0 4 1 2 1 3 1 5 2 3 2 4 2 5 3 4 4 5
3 3 0 3 5 2 1 4 1 2
5 10 0 1 0 2 0 3 0 4 1 2 1 3 1 4 2 3 2 4 3 4
5 1 4 1 3 1 2 1 1 1 0
No. | Testdata Range | Score |
---|