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

Common Board

С# and Memory
Posted by Andrew Hoffmann aka SKYDOS [Vladimir SU] 3 Aug 2010 21:14
Is it possible to solve some problems using less then 1 MB in C# ?
I tried 1010 problem to solve, but less then 941 KB I cannot do... :( it's bad...
May be there are some tricks to lower memory consumption ?

Thx.

PS
If code neded - just say, I will show.. maybe some ideas will appear.

Edited by author 03.08.2010 21:17
Re: С# and Memory
Posted by Alexander Samal 5 Aug 2010 02:45
You can run garbage collector manually:

  GC.Collect();

It helped me to solve problem 1269 where memory is very limited. But don't do so too often - this trick eats much time!
Re: С# and Memory
Posted by Andrew Hoffmann aka SKYDOS [Vladimir SU] 5 Aug 2010 11:07
Thanks for idea!

Is it possible to solve problem @Stacks@ using this trick?
Have you tried?
Re: С# and Memory
Posted by ppk1515 6 Aug 2010 08:38
give me a look.