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 2047. Maths

Fast solution?
Posted by Vladimir Li 5 Aug 2015 13:16
My AC is 0.8 seconds, what is the idea for 0.01sec solutions?
Re: Fast solution?
Posted by Programmer 30 Aug 2015 13:06
may be precalc?
Re: Fast solution?
Posted by JD 24 Sep 2015 06:01
Yea, precalc actually does work. I had an ineffecient solution which spent ~30 seconds and ~65 MB, so then i tried to precalc, but my initial variant didn't pass because it was 204kb of code, and the limit of 64kb is suddenly back (i don't recall it from before...)
In the end, i finally managed to compress it down to 63kb, due to the fact that out of 100k values, certain four numbers were present in 80%+ cases.
Re: Fast solution?
Posted by QProgS 31 Jan 2016 19:30
java  0.156 | 45 000 КБ

precalc)

100000 char's to 64K
Re: Fast solution?
Posted by svr 31 Jan 2016 21:27
theare is some big number ang long path from it to [1,100] by dividing
we can start moving from any place of this path