#P10738. [SEERC 2020] 3-colorings
[SEERC 2020] 3-colorings
Problem Description
This is an output-only problem.
A valid “3-coloring” of a graph is defined as follows:
-
The color of each vertex can only be in .
-
For every pair of adjacent vertices , the color of must be different from the color of .
It can be proven that the maximum number of “3-colorings” of a graph is .
Now you need to construct a graph. Initially, it has vertices and undirected edges. Then, for each with , you may add at most undirected edges so that the number of “3-colorings” of the graph becomes .
Input Format
None.
Output Format
The first line contains , representing the number of vertices and edges in the graph you construct.
Then output lines, each with two integers , indicating that there is an undirected edge .
Then for from to , for each output the number of edges you want to add, followed by that many lines of added edges .
3 2
1 2
2 3
1
1 3
0
Hint
The sample only provides examples for and .
Translated by ChatGPT 5