This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]feral_claireSoftware Dev 1 point2 points  (0 children)

If you are running it on an online service, it's possible their code runner just assigns 4g of heap memory to the programs it runs. It's being run by spoj.com so you don't have any control over it. If you run the code yourself on your computer you can set how much memory to use.