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

Used the adjacent list
Posted by zhangweilst 8 Jan 2016 17:38
But established it with an error which makes me WA #13.
Guess cases before #13 are simple with no big number of vex.
I get AC
Posted by novopashinwm 18 Jan 2016 19:47
Use BFS - i get AC. Make array size as n items. Rules for filling:
0 items equals -1, if first elements have childs them set 1 and use recurce.