If bipartition is possible, print space-separated integers: the team number ( or ) for each pupil from to . If impossible, print the single word IMPOSSIBLE. The color array becomes your answer directly. After running bipartite detection successfully, print color[1]+1, color[2]+1, through color[n]+1. Adding converts your internal colors and to team numbers and as required by the output format.
Graph Theory37 sections · 1633 units
Open in CourseCSES 1668 Building Teams - Output Format
Print the teams