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 exceeded on test 20 on java again and again!((
Posted by Aydar 7 Aug 2011 15:01
[code deleted]

Edited by moderator 01.12.2019 21:45
Re: Time limit exceeded on test 20 on java again and again!((
Posted by hatred 7 Aug 2011 20:49
I dont know java, therefore I may be mistake. Try to use binary search.
Re: Time limit exceeded on test 20 on java again and again!((
Posted by ISDemidoff 14 Aug 2011 21:03
I also using Java, but have AC with 0.25 s ans ~4.5 Mb
Try to use array of array of partial sums.

P.S. sorry for my bad English
Re: Time limit exceeded on test 20 on java again and again!((
Posted by Luka Bulatovic 25 Aug 2011 16:51
Use Fenwick Tree :)
Re: Time limit exceeded on test 20 on java again and again!((
Posted by daftcoder [Yaroslavl SU] 25 Aug 2011 17:10
No Fenwick Tree, just summ[y] - summ[x-1].