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 1320. Graph Decomposition

if input= 1 2 2 4 why output = 1
Posted by TestT 18 Jul 2004 12:55
Re: if input= 1 2 2 4 why output = 1
Posted by Gheorghe Stefan 28 Jul 2004 22:01
you have to count the edges in conex components and see if it is even(1) or odd (0). This case has one component with 2 edges so write 1.