This is the final code I submitted for REPLESX in October Long Challenge. I had rectified many times and this was my final code but still I got WA. Please help me to figure out a testcase I was missing.
Question Link :- https://www.codechef.com/OCT20B/problems/REPLESX
My code Link :- https://www.codechef.com/viewsolution/38887572