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 1620. Clever House

Java optimization tips
Posted by vlyubin 3 Apr 2012 08:44
Hey,
do the guys that submit on Java use BigInteger and array of (2 x BigInteger)[2000][1000]?
If yes, then how do they manage to pass the TL? Is it just a matter of Java optimization, or the solution is much harder than a simple DP?

Thanks !

Edited by author 07.04.2012 06:11
Re: Java optimization tips
Posted by VincentCheng 3 Oct 2016 13:50
It's more of a math problem than DP...
If you find the right pattern the solution is pretty simple and no optimization trick is needed to pass time limit.
good luck!