Hi everyone! I was ptracticining with some regional contests, and today we (my team) picked the Greater New York Regional Contest 2015.↵
↵
We managed to solve all but one problem. Here is the [link](https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&category=717&page=show_problem&problem=5386)↵
↵
The statement lacks of constraints, but the official data tests contains cases with at most 600 nodes.↵
↵
We tried a brute force with no success (obviously, there could be at most $2^n$ possible states).↵
↵
Can you help me? I read the official solution but I really couldn't understand it, however it doesn't seem very complicated. Maybe I'm missing something. ↵
↵
If you want to check it out, here is the official [solution](http://acmgnyr.org/year2015/solutions/f.cpp)↵
↵
Thanks!
↵
We managed to solve all but one problem. Here is the [link](https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&category=717&page=show_problem&problem=5386)↵
↵
The statement lacks of constraints, but the official data tests contains cases with at most 600 nodes.↵
↵
We tried a brute force with no success (obviously, there could be at most $2^n$ possible states).↵
↵
Can you help me? I read the official solution but I really couldn't understand it, however it doesn't seem very complicated. Maybe I'm missing something. ↵
↵
If you want to check it out, here is the official [solution](http://acmgnyr.org/year2015/solutions/f.cpp)↵
↵
Thanks!