A question about memory usage in Python3
Difference between en1 and en2, changed 16 character(s)
I'm trying to solve the python indentation problem in [round 455C](http://codeforces.com/problemset/problem/909/C). My [submission](http://codeforces.com/contest/909/submission/33846423) is receiving a memory limit exceeded exception. ↵

Memory limit is:                                                         256 * 1024 * 1024 =  268435456 bytes↵

In my code I am using at most a 5000*5000 matrix to hold the dp values and this will occupy ~ 200000064 bytes↵

I am also using a string to hold the program and it will occupy:                                   5049 bytes↵

I am using about 6 int variables in my program and then will occupy:                      6 * 28 =  168 bytes↵

so in total:                                                                                  200005281 bytes↵

Or 191 MB. So According to my calculations I am still bellow 200 MB, but in CF I am exceeding 256MB. Is there something that I am missing in the memory computation? Is the python interpreter size counted within the memory computation also?  

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English motatoes 2018-01-01 15:28:39 16 change men exceeded exception to memory exceeded exception
en1 English motatoes 2018-01-01 15:27:25 1079 Initial revision (published)