As description of question mentioned, we need to output the smaller group of children, which fits the restrictions. However, for sample output, we can also put 5 [without any adversary] into abitrary group, so, the smallest group should not be 1,2,5,6, that's 1,2,6. Am I right? and my program could produce another seemingly meanful answer: 3,6,7[1,2,4,8,5 another group]. yeah, a little bit lost! could someone help me out? Thank a lot in advance! ^_^
Re: Sample output seems contradictory with description!