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 1510. Order

C# and out of memory
Posted by Pavel 1 Mar 2021 15:53
If you are using C# and running out of memory somewhere at test 36 think how to gracefully call the GC because the heap is full of strings u read from console.
Re: C# and out of memory
Posted by Vadim Kostariev 24 Oct 2021 18:50
Thanks a lot. I thought that I need to use some other algorithm, because I just created a dictionary with the bill key and  value counter++ then did sorting through the Linq and it's definitely inefficient, but in I still succeeded. I inserted a GC.Collect() for every 1000 iterations of reading and I passed all the tests.

Edited by author 24.10.2021 18:54
Re: C# and out of memory
Posted by Gekcha 29 Aug 2023 01:29
Thank you, i get tired of this problem <3