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 1073. Square Country

Did I misunderstood -_-a WA Test 5
Posted by rakker 30 Apr 2006 21:37
Help Please !!
Re: Did I misunderstood -_-a WA Test 5
Posted by Aleksander 7 May 2006 00:48
connect to question: why?
Re: Did I misunderstood -_-a WA Test 5
Posted by Aleksander 7 May 2006 01:30
close connection :)

author, check test 181: correct answer is 2: 10^2+9^2.
Re: Did I misunderstood -_-a WA Test 5
Posted by Tbilisi SU: Andrew Lutsenko 12 Jul 2006 22:41
any ideas about the algorythm?
I used DP but it's tle-ing on #6 :(
Re: Did I misunderstood -_-a WA Test 5
Posted by Fokysnik 13 Aug 2006 13:34
Tbilisi SU: Andrew Lutsenko wrote 12 July 2006 22:41
any ideas about the algorythm?
I used DP but it's tle-ing on #6 :(

Try to do some improvements to your DP. You don't need to do complete DP.
I used DP with recursion. At first it got TLE#5. First improvement led to TLE#6. Second improvement - TLE#11.
Finaly after last improvement I got AC in 0.703sec and 146KB

But another, better algorithm exists ;)