-
-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
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
Segment Tree Beats template bug in .range_max()
#1296
Comments
small RE case
|
RE with
|
RE
NOT RE
|
Therefore, it seems there is an issue with the initialization of this Segtree Beats. |
segment_tree_beats(int n_) {} |
Thank you for the bug report. I have confirmed that a bug occurs when using beats(n) instead of beats(first, last) in the constructor of segtree_beats. Regarding your submission, the version with the constructor replaced resulted in TLE. However, I have confirmed that it outputs correct results for small_random test cases. |
It looks tagging the node by I think that |
Segment Tree Beats template code does not work when the method
.range_max()
is called as a query.Here are two submissions that differ only in the segtree beats implementation:
The queries used in this problem are:
Stress testing finds the following input on which the code REs: pastebin
I don't know exactly where the bug is, but the implementation doesn't work as expected.
P.S. This costed me one hour of contest and a failed problem(
The text was updated successfully, but these errors were encountered: