221D — Little Elephant and Array
I've solved this problem using sqrt decomposition. but how can i solve it using segment tree?
Thanks in advance :)
CF Edu Round #165 Solution Discussion
Educational Round 165 Solution Discussion (with myself)