Print a fixed 4-vertex, 5-edge graph and a fixed proper 4-coloring, with no input to read.
Easy1ImplementationGraphNo attempts yetTime limit2sMemory limit512 MBJigui 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 4 vertices. There are 5 edges: every pair 1≤a<b≤4 except {3,4}. Print the edges in increasing order of a, and for equal a in increasing order of b. Color vertex i with color i. The only missing edge is {3,4}, so every pair of adjacent vertices has different colors.
Help Dotori stay out of Turingism.
There is no input.
Print the vertex count N and the edge count M on the first line. N is 4 and M is 5.
Then print 5 lines of endpoints a and b, separated by a space. The order is 1 2, 1 3, 1 4, 2 3, 2 4. Duplicate edges are not allowed.
Then print N integers ci on one line, the color of vertex i. The values are 1 2 3 4.