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 1220. Stacks

MLE #1
Posted by Lebedev_Nicolay[Ivanovo SPU] 1 Mar 2009 16:10
I use :
int a[ 100000 ];
short num[ 100000 ];
And I have MLE #1!!!
Re: MLE #1
Posted by Ildar Valiev 1 Mar 2009 18:51
100000 * 4 + 100000 * 2 = 600000 bytes + plus memory for your programm.
Memory limit can be 750000 bytes instead of 750 Kb.
Re: MLE #1
Posted by Lebedev_Nicolay[Ivanovo SPU] 1 Mar 2009 21:37
How to avoid MLE???
Re: MLE #1
You use too much memory. Try to fit into one array int[100000]...
Re: MLE #1
Posted by Lebedev_Nicolay[Ivanovo SPU] 1 Mar 2009 23:12
Can you prompt me? I can't think up how to do it.
Re: MLE #1
For example, look at corresponding section in D. Knuth's book (something about several stacks in one memory segment)
Re: MLE #1
Posted by Lebedev_Nicolay[Ivanovo SPU] 4 Mar 2009 23:18
I can't find it!? Can you tell me any idea???
Re: MLE #1
Posted by Amirbekov Artem[Ivanovo SPU] 28 Mar 2009 23:31
Just use the "realloc()" function ;-)