I recently attempted this problem https://www.codechef.com/COOK77/problems/CHEFNUMK
using MO's algorithm (offline sqrt decomp) but got TLE. Almost everyone used the same method to reach AC. Changing values of blocks affects the complexity is known, and i tried a few values. Comparing the following code
with my code
doesn't show much difference, help ?