← ALL NOTES
Array

3501. Maximize Active Section with Trade II

Given a binary string s. One trade takes a block of ones surrounded by zeros, zeros it, then makes a block of zeros surrounded by ones into ones. For each query [l, r], the substring s[l..r] is…

Loading…