ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1106. Two Teams

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.