Hi,
I'm learning about segment trees at this moment. So I tried doing this exercise: https://codeforces.net/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