Hi,
I'm learning about segment trees at this moment. So I tried doing this exercise: https://mirror.codeforces.com/contest/356/problem/A. However, I didn't succeed. Unfortunately, the editorial doesn't mention the segment tree approach. Could someone explain how you would go about solving this with a segment tree.
Thanks