Test 1
Послано
lex_t 26 апр 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.