memory usage

memory consumed by my programs are always 2.2M how to reduce it to 1.6 and more???
Is it due to my platform or any other reasons??

1 Like

Less use of functions and also don’t include any header file which is not necessary.

@vermason as far as I know, it is MINIMUM memory used (atleast while programming on online judge), so it can’t be reduced further.
and yes it is language dependent.

Here is a analysis :

C : 2.2M

(verify here : http://www.codechef.com/submissions/submissions?sort_by=Mem&sorting_order=asc&language=11&status=15&handle=&pcode=&ccode=NOV14&Submit=GO )

C++ 4.3.2 : 2.6M

(verify here : http://www.codechef.com/submissions/submissions?sort_by=Mem&sorting_order=asc&language=41&status=15&handle=&pcode=&ccode=NOV14&Submit=GO )

C++ 4.8.1 : 3.2M

(verify here : http://www.codechef.com/submissions/submissions?sort_by=Mem&sorting_order=asc&language=1&status=15&handle=&pcode=&ccode=NOV14&Submit=GO )

Python : 3.9M

(verify here : http://www.codechef.com/submissions/submissions?sort_by=Mem&sorting_order=asc&language=4&status=15&handle=&pcode=&ccode=NOV14&Submit=GO )

and so on...

1 Like