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 1513. Lemon Tale

O(n) algo with java BigInteger is getting TLE 15 HELP PLEASE
Posted by muhammad 25 Jun 2010 16:10
I used O(n) with sum and subtract. But it's too slow to AC
Please someone help me.
pp: please
Re: O(n) algo with java BigInteger is getting TLE 15 HELP PLEASE
Posted by muhammad 25 Jun 2010 16:36
sorry got AC.
i calculated power every time which made it slow
later i just multiplied by 2 each time which gave AC