| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 1024 MB | 134 | 78 | 72 | 67.290% |
We have a complete graph of size $N$. Find a way to represent the set of edges in this graph as the union of several $N$-vertex trees. Specifically, $K$ denoting the number of trees and $K$ trees $T_1, ..., T_K$ satisfying the following conditions should be output.
Input has only one line containing $N$.
Print out $K$ at the first line. $K$ must be the minimum. After that, print the edges of $T_1$ one by one over the following $(N-1)$ lines. Output all $K$ trees in the same way without any empty lines. Each tree must satisfy the condition of the problem.
| 번호 | 배점 | 제한 |
|---|---|---|
| 1 | 20 | $N \le 8$ |
| 2 | 80 | No additional constraints. |
3
2 1 2 2 3 1 3 1 2
4
2 1 2 2 3 3 4 2 4 1 3 1 4