Skip to content

Commit c863253

Browse files
committed
fix beats bug
1 parent bf47bbf commit c863253

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

segmenttree/acl_beats.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ F composition(F fnew, F fold) {
7676
F id() { return F(); }
7777
S mapping(F f, S x) {
7878
if (x.sz == 0) return e();
79-
if (x.lo == x.hi or f.lb == f.ub or f.lb >= x.hi or f.ub < x.lo)
79+
if (x.lo == x.hi or f.lb == f.ub or f.lb >= x.hi or f.ub <= x.lo)
8080
return S(std::min(std::max(x.lo, f.lb), f.ub) + f.bias, x.sz);
8181
if (x.lo2 == x.hi) {
8282
x.lo = x.hi2 = std::max(x.lo, f.lb) + f.bias, x.hi = x.lo2 = std::min(x.hi, f.ub) + f.bias;

0 commit comments

Comments
 (0)