Test 1
Posted by
lex_t 26 Apr 2015 15:08
Hi,
I have a solution which seems correct. For the first test it gives me the following answer:
4
1 4 5 6
I consider, it fits to the problem statement. Could anyone clarify, what is going wrong?
My algorithm is based on BFS and I always mark start vertex in a connected component as a first team vertex.