| 147 | } |
| 148 | |
| 149 | public static void main(String[] args) throws Exception { |
| 150 | FastReader in = new FastReader(System.in); |
| 151 | PrintWriter out = new PrintWriter(new OutputStreamWriter(System.out)); |
| 152 | cntg = 1; |
| 153 | n = in.nextInt(); |
| 154 | m = in.nextInt(); |
| 155 | for (int i = 1, u, v; i <= m; i++) { |
| 156 | u = in.nextInt(); |
| 157 | v = in.nextInt(); |
| 158 | addEdge(u, v); |
| 159 | addEdge(v, u); |
| 160 | } |
| 161 | for (int i = 1; i <= n; i++) { |
| 162 | if (dfn[i] == 0) { |
| 163 | // tarjan1(i, 0); |
| 164 | tarjan2(i, 0); |
| 165 | } |
| 166 | } |
| 167 | out.println(ebccCnt); |
| 168 | for (int i = 1; i <= ebccCnt; i++) { |
| 169 | out.println(ebccSiz[i]); |
| 170 | for (int j = ebccl[i]; j <= ebccr[i]; j++) { |
| 171 | out.print(ebccArr[j] + " "); |
| 172 | } |
| 173 | out.println(); |
| 174 | } |
| 175 | out.flush(); |
| 176 | out.close(); |
| 177 | } |
| 178 | |
| 179 | // 读写工具类 |
| 180 | static class FastReader { |