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

actually this is an easy problem!
Posted by Krum Bakalsky 17 May 2007 18:17
no bitwise shit needed, no storing 17 bits for indexes and no such stuff! just use unsigned stack* [1000] for the stacks (store elements in a dynamic array, reallocating memory for each push), and unsigned  top[1000] for the index of the top element. with this i got AC with 663 KB! good luck!
Re: actually this is an easy problem!
Posted by Mahilewets 16 Jul 2017 19:59
Looks like solve the problem in such a manner is no longer possible
Because ,as of 2017, there is no Intel C++ compiler

And every other compiler fails to allocate memory effective

Probably when reallocating there  are empty spaces  which count  as memory used

And Intel Compiler was able to get rid of such spaces.