Some days back I was solving this problem on CodeForces, and I was getting TLE(Time Limit Exceeded) for my solution, even though I knew it shouldn’t take too long to run, since I had already optimized my code, after reading the editorial. The code segment which was taking the most amount of time was this: for (int i = 0; i < q; i++) { if(x[i] > min_processed) continue; else{ min_processed = min(min_processed, x[i]); for (int j = 0; j < n; j++) { if (a[j] % static_cast < int > (pow(2, x[i]))...| jitesh117.github.io