Hey there Codeforces!
I was trying to solve the C problem in Codeforces Testing Round #1.
I knew that so many people solved it using binary lazy tree but I wanted to try another aproach. I tried to solve it using SQRT Decomposition. I've got so many wrong answers and altough I've worked on it for like 2 days I couldn't fix the problem. Can you please help me about that?
My code is this.
If you find any bugs or if you have any suggestions I would appreciate it.
Thank you already!