Can you discuss your approach for CHEFEXQ

I made a video tutorial for this problem at my youtube channel. Watch it here Learn SquareRoot Decomposition Trick By Solving This Codechef Problem - DEC17 CHEFEXQ - YouTube

1 Like

@rachitiitr can you tell me if I can solve this problem with the help of segment tree or not ?