Maxim and Progressions

wrote an O(n^2) algorithm…but repeatedly getting TLE…can anyone please confirm whether this problem demands even better solution or not?

1 Like

obviously it needs a better solution as you know that n<=200000 and number of test cases are 10.and you should also know that computer can process about 10^8 instructions per sec.

3 Likes

thanks a lot…i will try to improve my solution!!

best of luck :slight_smile: