All about problems in Volume 114. If there is a thread about your problem, please use it. If not, create one with its number in the subject.
Moderator: Board moderators
5 posts • Page 1 of 1
- Experienced poster
- Posts: 196
- Joined: Wed May 02, 2007 10:12 pm
- Location: Hungary, Pest county, Halasztelek
The problem is equivalent to factorize n (it is a little algebra to figure out the factors) for this I've used Pollard rho method (by Brent's modification).baodog wrote:Hi Robert,
How did you solve it in 10ms . Is it possible to construct the solutions
directly without searching? Thanks!
My O(sqrt(S)) algorithm got AC in 1.3sNaani wrote:My O(sqrt(n)) solution is timing out. Any hints are appreciated. I just dont see any different algorithm.