I was solving a segment tree problem in witch you are given:
Update L, R. — updates [L;R] with the value of the current query (1, 2, ... M)
Query. — count different elements in [N; M]
I couldn't come with an aproach. I will be really happy if someone helps me with it. Thankd in advance! :)