Skip to content

Commit

Permalink
fix beats bug
Browse files Browse the repository at this point in the history
  • Loading branch information
hitonanode committed Apr 28, 2024
1 parent a058736 commit 0f84dd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion segmenttree/acl_beats.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ F composition(F fnew, F fold) {
F id() { return F(); }
S mapping(F f, S x) {
if (x.sz == 0) return e();
if (x.lo == x.hi or f.lb == f.ub or f.lb >= x.hi or f.ub < x.lo)
if (x.lo == x.hi or f.lb == f.ub or f.lb >= x.hi or f.ub <= x.lo)
return S(std::min(std::max(x.lo, f.lb), f.ub) + f.bias, x.sz);
if (x.lo2 == x.hi) {
x.lo = x.hi2 = std::max(x.lo, f.lb) + f.bias, x.hi = x.lo2 = std::min(x.hi, f.ub) + f.bias;
Expand Down

0 comments on commit 0f84dd1

Please sign in to comment.