Codeforces Round #698 Nezzar and Binary String - Segment tree
Of course a segment tree problem. Let's start from $f$. Then actually, the state of last day is fixed. Also fixed for the day before last day. The only thing we need to know is how many zeros between $l$ to $r$. Then we can know what is changed.…