|  | 
|  | 
| back to board | Some hints how to solve it 1. Answer always exists.2. Use DFS for all unmarked vertices and mark them: if current vertex is marked as x, all next must be marked as (x + 1) % 2. (0->1, 1->0)
 3. Then just print all vertices marked by 0 (or 1).
Re: Some hints how to solve it Posted by ile  26 Jun 2010 01:17 
 Edited by author 26.06.2010 04:17
Re: Some hints how to solve it I think, it doesn't need to use DFS. If the edge hasn't incident edges that belong to the first team, we add this edge to the fisrt team. That's all:)Re: Some hints how to solve it Posted by sylap  16 Oct 2012 22:27If someone has no friends, there is no answer !!Re: Some hints how to solve it I think, it doesn't need to use DFS. If the edge hasn't incident edges that belong to the first team, we add this edge to the fisrt team. That's all:) Thanks, you very helped me) | 
 | 
|