Birjik and Nicole's Tree Game

Sort by

recency

|

2 Discussions

|

  • + 0 comments

    Nice problem. The editorial C++ solution has one small bug. When using dfs to do the tree traversal, we should consider the max depth of the tree. The max depth could be n=300000 and it will cause the segmentation fault due to the maximum stack level limit. Luckily, no such cases in test data. I suggest everyone to use array or other algorithms to solve the tree traversal to avoid the segmentation fault.

  • + 1 comment

    Do you want to unlock and read the editorial? If you do, your score will not be counted toward your progress.

    Does this mean ratings would not be counted ? Can I open the editorial now as the contest has ended ?

No more comments