Skip to content

Contact Form Submission - Mistake (Solution to Focus problem: GCDEX - GCD Extreme from SPOJ, Module: Divisibility, Section: Gold) #5486

@maggieliu05

Description

@maggieliu05

Someone submitted the contact form!

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions