I am working on Segment Trees, and more recently with [this implementation](https://codeforces.me/blog/entry/18051) by [user:Al.Cash,2019-09-03]↵
↵
He brings up this [problem](http://acm.timus.ru/problem.aspx?space=1&num=2042) but even with the segment tree already built (I assume it stores the number of 'c's in a given range) I don't know how to answer the queries in O(logn). If it's all 'c's then it's easy but what if it's not? Some sort of divide and conquer?↵
↵
I would appreciate some help with that problem, and recommendations for other good segment tree problems. Preferably on Codeforces (there is no segTree tag; data structures is the closest but it's no guarantee).↵
↵
Thanks and have a good day!↵
↵
He brings up this [problem](http://acm.timus.ru/problem.aspx?space=1&num=2042) but even with the segment tree already built (I assume it stores the number of 'c's in a given range) I don't know how to answer the queries in O(logn). If it's all 'c's then it's easy but what if it's not? Some sort of divide and conquer?↵
↵
I would appreciate some help with that problem, and recommendations for other good segment tree problems. Preferably on Codeforces (there is no segTree tag; data structures is the closest but it's no guarantee).↵
↵
Thanks and have a good day!↵