By reading the editorial i wrote my code using segment tree with lazy propagation but on submitting i am getting AC on 2 test cases and TLE on remaining I am getting TLE even in the first subtask.
I checked my code by taking test cases of order n=10^3 , q=10^3 and in all those test cases my code is working fine.
Please anyone help me to get rid over it. That will be of great help indeed.