We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf47bbf commit c863253Copy full SHA for c863253
segmenttree/acl_beats.hpp
@@ -76,7 +76,7 @@ F composition(F fnew, F fold) {
76
F id() { return F(); }
77
S mapping(F f, S x) {
78
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)
+ if (x.lo == x.hi or f.lb == f.ub or f.lb >= x.hi or f.ub <= x.lo)
80
return S(std::min(std::max(x.lo, f.lb), f.ub) + f.bias, x.sz);
81
if (x.lo2 == x.hi) {
82
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