You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
URL: https://usaco.guide/dashboard/ Module: Solution to Focus problem: GCDEX - GCD Extreme from SPOJ, Module: Divisibility, Section: Gold Topic: Mistake Message:
The solution for the focus problem GCD Extreme has a wrong time complexity, which is too slow to pass. Unless I am mistaken, the time complexity given is O(N) per query which is too slow to pass the SPOJ judge. I have verified this by submitting the given solution to SPOJ, and it indeed gives a time limit exceeded ruling. There is a much simpler solution of time complexity of O(N logN) of preprocessing + O(1) per query.