Hands are faster than computers
Time limit2sMemory limit512 MB
Print a fixed 4-vertex, 5-edge graph and a fixed proper 4-coloring, with no input to read.
- Level
Easy1 of 10
- Topics
- Implementation, Graph
- Solved
- No attempts yet
Problem
Jigui is the leader of Turingism, a religion whose lesson is "if a computer cannot solve it, a person cannot solve it either." The group recruits with unusual force. Every day they walk uninvited into university algorithm clubs and, at the same time, play addictive songs such as Ring Ding Dong or Oronamin C to interrupt study. Jigui claims that playing those songs makes recruiting more effective.
Dotori suffered too much from the recruiting, and still seems to hear Ring Ding Dong. To break the lesson of Turingism, Dotori sent Jigui a challenge. The challenge reads as follows.
"Dear Leader Jigui. Let us make a bet on the condition that you reduce the intense recruiting. I will pose one problem. I will solve it by hand, and you will solve it using only a computer. Whoever finishes first wins. If I lose, I will join Turingism. From Dotori"
After several messages the bet was agreed. The problem Dotori posed is to color a graph with four colors so that every pair of adjacent vertices has different colors.
The original statement allowed any vertex count, any edge list, and any valid 4-coloring of the printed graph. This problem fixes both the graph and the coloring.
There are vertices. There are edges: every pair except . Print the edges in increasing order of , and for equal in increasing order of . Color vertex with color . The only missing edge is , so every pair of adjacent vertices has different colors.
Help Dotori stay out of Turingism.
Input
There is no input.
Output
Print the vertex count and the edge count on the first line. is and is .
Then print lines of endpoints and , separated by a space. The order is , , , , . Duplicate edges are not allowed.
Then print integers on one line, the color of vertex . The values are .