Question Link: https://www.codechef.com/LTIME58B/problems/GQR
Answer Link: https://www.codechef.com/viewsolution/18014017
My code will run for first two subtask, but not for the third as array size is becoming too large.
I have checked the test cases, the code should follow the first 2 subtask. But still it is showing TLE. WHY...???????