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

Why Crash (access violation)
Posted by Ignat Zakrevsky 6 Feb 2007 18:39
I have got Crash (access violation) in test 20!
Why? Is my source:


Edited by author 11.02.2007 04:22
Re: Why Crash (access violation)
Posted by {AESC USU} Evgeny Kurpilyanskij 6 Feb 2007 18:50
q<=100000!!!
but r:array[1..10010]of longint
Re: Why Crash (access violation)
Posted by Ignat Zakrevsky 6 Feb 2007 19:55
Thenks, but I have Time limit exceeded in test №20
Re: Why Crash (access violation)
Posted by Lomir 6 Feb 2007 19:59
Try to think for a other solution for this problem.
Re: Why Crash (access violation)
Posted by Ignat Zakrevsky 6 Feb 2007 20:36
My new source but it not accepted:


Edited by author 11.02.2007 04:22
Re: Why Crash (access violation)
Posted by Ignat Zakrevsky 8 Feb 2007 00:52
But, and this source have time limit:

Edited by author 11.02.2007 04:21
Re: Why Crash (access violation)
Posted by Lomir 8 Feb 2007 01:23
Use this apparoach.
Stoge at a[i] the sum from a[0] to a[i].
Then the answer between e, q will be just difference between sums: a[q] - a[e-1].