Declaring large sizes locally and globally

Revision en2, by Jim_Moriarty_, 2020-04-28 04:14:34

I was recently solving a problem using a vector first but I got MLE (memory limit exceeded). Then I declared an array of maximum size it got accepted in only 64 KiB. So if any of you know about how does memory limit get affected when we declare anything (large size) globally. And how does it affect the memory limit.

Code which got MLE — https://www.hackerearth.com/submission/41144649/ Code which got AC — https://www.hackerearth.com/submission/41145515/

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Jim_Moriarty_ 2020-04-28 04:14:34 155
en1 English Jim_Moriarty_ 2020-04-27 19:10:56 359 Initial revision (published)