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 1037. Memory Management

Show all messages Hide all messages

I get memory limit exceed using only 600 Kb (without pointers). Can someone explaine it???
There is part of my program.

{$APPTYPE CONSOLE}
{$R+,Q+}
program ural1037;
const
   mem_max = 30001;
   delay = 600;
type
   node = record
      parent, left, right: longint;
      min, time: longint;
   end;
var
   tree: array [0..mem_max] of node;
   root: longint;
   time, num: longint;
   ch: char;

procedure ...
I have got AC, replacing some "integer" by "word" only, saving 120 Kb on it. So, there is no "perpetual cycle". Stack are used very small (less then 1Kb). Some other assumptions?

Edited by author 15.03.2005 21:58