ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1593. Square Country. Version 2

Show all messages Hide all messages

No.
If you TLE read forum for task 1073.
Roma, O(sqrt(n)) is good time to find a, b : a^2 + b^2 = n
My O(sqrt(n)) solution gets AC in 0.25 sec.

-------------------
Sergey Kopeliovich
[code deleted]

-------------------

Вот это получает

Roman Atangulov    1593    C++    Time limit exceeded    13    1.046    137 KB

Edited by author 28.04.2009 21:22

Edited by author 29.04.2009 14:21
Is answered in vkontakte.
I know O(N^0.5) algo, but I use array[N] :(
Please tell me some ideas, how to solve this task without array? Thanks