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 1330. Intervals

Time Limit on #20 again.
Posted by Lampabash 21 Feb 2006 17:36
I understand that i am using bad algo.
Please show the way to write good algo.
Thanks
Re: Time Limit on #20 again.
Posted by Ayhan Aliyev [BOTL] 21 Feb 2006 20:05
Easy. Calculate the sum quickly using a[j]-a[i-1] where a[i] is sum of all elements from 1 to i.