Regarding Compiler Difference

on codechef compiler my code take just 15kb…bt on hackerearth compiler it shows memory limit exceeded…
even i dont understand why it gave memory limit exceeded…can anyone help me on this…

and on hackerearth compiler it gives 342044kb memory on just compile…

//