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 1103. Pencils and Circles

Why I got "Memory Limit Exceed'?
Posted by aa 16 Apr 2003 17:40
{$E-,N+}

Program p1103;
Const maxn=5000;

// deleted

Begin
     Init;
     Solve;
     Sout;
End.

Edited by moderator 22.04.2004 00:33
Who can answer me the problem?Please help!!
Posted by aa 18 Apr 2003 17:44
There must be some mistake with the judge. When I change 'maxn=5000'
into 'maxn=50', it also get 'Memory Limit Exceeded'.
Infinite recursion. Wrong sorting algorithm.
Posted by Vlad Veselov 21 Apr 2004 22:50
If you'll change
---
While (x-degree[i]<1e-6) do inc(i);
While (degree[j]-x<1e-6) do dec(j);
---
to
---
While (x>degree[i]) do inc(i);
While (degree[j]>x) do dec(j);
---
you'll get WA on test 1.