We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For this problem, the solution given (https://usaco.guide/problems/cses-2101-new-roads-queries/solution) uses Platinum topics.
There's a more elementary solution with parallel binary search here: https://duoblogger.github.io/assets/pdf/memonvyftw/guide-t-cp.pdf (section 15.5.3). Also, the top user solution uses parallel binary search.
The text was updated successfully, but these errors were encountered:
another way (though not simpler) is to convert the tree into a line, then it reduces to RMQ queries which can be answered in $O(1)$ time each.
ref: https://codeforces.com/blog/entry/71568?#comment-559304
Sorry, something went wrong.
we can also use dsu stuff described in the solution to this problem
No branches or pull requests
For this problem, the solution given (https://usaco.guide/problems/cses-2101-new-roads-queries/solution) uses Platinum topics.
There's a more elementary solution with parallel binary search here: https://duoblogger.github.io/assets/pdf/memonvyftw/guide-t-cp.pdf (section 15.5.3). Also, the top user solution uses parallel binary search.
The text was updated successfully, but these errors were encountered: