Hello Codeforces!!
I have another question for you now. I spent a lot of time coding this question but now I don't know what to do.
In the code I wrote 306101842 for this question 551E - GukiZ and GukiZiana, I reduced the memory usage and almost reduced the number of arrays and map used to 50!! (You can see it in my submissions. In fact, theoretically this seems wrong, but from somewhere I just wanted to see if it was possible to timeout but free up the memory?)
But there was no change in the amount of memory involved in the page My Submissions! (And the amount still remained at 262100 KB)
Can you tell me what is going on? I recently encountered a similar problem while trying to solve another question. So I need your urgent help!
- Ok. I just realized that I'm really using up a lot of memory.. Can anyone tell me what I can do better?
Maybe I didnt understood you but if you get ML with 256 MB it means that your solution consumes more than 256 MB. if you're trying to figure out how much memory your solution requires just copy this task in mashup and set bigger ML
ok. thanks.
Auto comment: topic has been updated by K.Outis (previous revision, new revision, compare).
Each time you try to access a key which is not present in map, a new pair of <key, default> is added to your map. worst case you will have q * number_of_blocks pairs in your map which results in mle. try solving this problem whitout map
Thank you so much.
Hi
Is there any way to erase the <key, default> pair after each query so it wont hit MLE?
you can use set instead of map